-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query string parameters not appearing in google analytics #229
Comments
Update on this one: after probing further, I found downgrading the module to 1.6.4 fixes the problem. All versions above that seem to stop passing query strings. |
To resolve this I set pageTrackerSkipSamePath to false and give atemplate for pageTrackerTemplate like this : ...
pageTrackerSkipSamePath: false,
pageTrackerTemplate(to) {
return {
page_title: to.name,
page_path: to.fullPath,
page_location: window.location.href,
};
},
... But it could be great to check the fullPath for duplicate too. Maybe be it could be an option? I can help with a pull request if it make sens. |
@HairMachine sorry for the long-delayed response. I have added a new option that makes you use the {
// plugin options
pageTrackerUseFullPath: true, // default is false
} thanks for your feedback |
🎉 This issue has been resolved in version 1.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you! :) |
Description
When visiting a page that contains query parameters, (such as /blah?foo=bar), the query parameters do not appear in the google analytics dashboard - so only /blah is appearing.
I believe this started happening when we switched from the original vue-analytics version of the library to this one; query parameters had previously been working fine.
I am not 100% sure whether this is expected behaviour and I'm missing some configuration, a bug in the library, or something strange with our implementation (although the vue site I'm seeing this occur on is very simple). Searching on google and probing the code hasn't got me anywhere so far.
Expected behavior
When the user visits a page that has query parameters, these are tracked and appear in the Google Analytics dashboard.
Actual behavior
The query parameters don't appear in the Google Analytics dashboard.
Environment
vue-gtag@1.10.0
Linux Mint 18 Sarah
Google Chrome 81.0.4044.129
The text was updated successfully, but these errors were encountered: