-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(google-analytics): fix pageview timing issue by delaying it #10917
Conversation
It might be that context on why setTimeout was used was missing - can you add comment there to note why this is needed? |
@jorgenblindheim @pieh Checking in here. I am experiencing the same issue (the page title fired off to GA is the previous page's title because GA updates before React-Helmet can update the meta info). I've simply installed Will this PR be merged in? This is a pretty fundamental bug that i think should be addressed as it essentially sending inaccurate info to Analytics. What is an alternate solution to making this fix myself? I do not have any experience in forking an npm package and making my own updates to it. |
@drake-smith i'll be checking this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched setTimeout to requestAnimationFrames to make it a bit more robust as react-helmet is using requestAnimationFrames as well
Holy buckets, @jorgenblindheim — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
…byjs#10917) There is still a problem with title and path not being correct while navigating across a page. As referenced in: gatsbyjs#9139 Solution made in: gatsbyjs#2478 and gatsbyjs#3362 For some reason the previous solution is being overwritten Co-authored-by: Ward Peeters <ward@coding-tech.com>
There is still a problem with title and path not being correct while navigating across a page.
As referenced in: #9139
Solution made in: #2478 and #3362
For some reason the previous solution is being overwritten