Skip to content
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

Support anchor links for pageview tracking #103

Closed
eikaramba opened this issue Mar 30, 2020 · 5 comments
Closed

Support anchor links for pageview tracking #103

eikaramba opened this issue Mar 30, 2020 · 5 comments
Labels

Comments

@eikaramba
Copy link

eikaramba commented Mar 30, 2020

In the old GA library when i just had the basic setup with

  Vue.use(
    VueGtag,
    {
      config: { id: "UA-XXXXX" }
    },
    router
  );

(of course the syntax looked a little bit different with the old library)

when i clicked a link /#test it was tracked as a pageview. In the new library it is not tracked anymore.

Can you enable that or tell me what needs to be done to support this?

Sample Code from the app is:
<v-btn to="/#test">test</v-btn>

@biapar
Copy link

biapar commented Apr 21, 2020

I've the same problem.

@MatteoGabriele
Copy link
Owner

yeah the issue is that path is always / in your case, because the hash is added to another property called hash.
in the other library I used a option to skip same paths, so maybe that would work in this case.
I will add it either way because it could be useful in other scenarios as well

@MatteoGabriele
Copy link
Owner

🎉 This issue has been resolved in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MatteoGabriele
Copy link
Owner

you can add pageTrackerSkipSamePath: false to the plugin options and should work.
let me know if works for you

@eikaramba
Copy link
Author

great! yes it works. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants