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

Page tracking for root path with router.base set reported with trailing slash when trailingSlash is false #21

Closed
rchl opened this issue Mar 17, 2020 · 1 comment

Comments

@rchl
Copy link
Member

rchl commented Mar 17, 2020

It might be a non-issue from GA's perspective but reporting it anyway to asses that.

  1. Set Nuxt options:
router: {
  base: '/base/',
  trailingSlash: false,
}
  1. Visit root page http://localhost:3000/base
  2. Have a look at nuxtRoute event in window.dataLayer

Expected:
The pageUrl should, in theory, be /base

Actual:
The pageUrl is /base/

So the path reported doesn't match the actual path due to extra trailing slash. That might or might not be a problem for GA. Another case to consider is when router.base is not set. Then the route page actually has / path because browsers are automatically adding it (even if they are not showing it in the UI) and that's probably just fine as then the URL will match. So the only issue seems to be with index route and router.base set.

@manniL fyi

@rchl
Copy link
Member Author

rchl commented Apr 12, 2020

This was fixed by linked PR.

@rchl rchl closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant