From a00a67f8c1b3c69abdf2501e1a8abdd21c3779ef Mon Sep 17 00:00:00 2001 From: uto-usui Date: Wed, 31 Oct 2018 10:57:17 +0900 Subject: [PATCH] issue#3 | Adjust the value of router.base in page_path sent with router.afterEach. --- lib/templates/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/templates/config.js b/lib/templates/config.js index e5fce01..b7d411b 100644 --- a/lib/templates/config.js +++ b/lib/templates/config.js @@ -18,7 +18,7 @@ export default function ({app: {router}}, inject) { if(!<%= options.disableAutoPageTrack %>){ router.afterEach((to) => { - gtag('config', '<%= options.id %>', {'page_path': to.fullPath}) + gtag('config', '<%= options.id %>', {'page_path': router.history.base + to.fullPath}) }) }