Repository navigation
Conversation
Contributor
Author
|
I'm not really sure about what's causing this test failure. I don't think this code change (extra setTimeout) should be breaking anything, since the function being called just invokes the Google pageview event, and the syntax is correct as far as I can tell. |
Simon-Tang
force-pushed
the
feat/gatsby-plugin-google-gtag-delayOnRouteUpdate
branch
from
November 11, 2022 19:56
1749cdc to
2de4641
Compare
Contributor
Author
|
I think these are probably just flaky tests, reran and the original failure passed. These changes were already in use for the last few years in the old plugin, though. |
LekoArts
suggested changes
Nov 16, 2022
Simon-Tang
force-pushed
the
feat/gatsby-plugin-google-gtag-delayOnRouteUpdate
branch
from
November 17, 2022 01:44
2de4641 to
7ec55ed
Compare
LekoArts
approved these changes
Nov 17, 2022
delayOnRouteUpdate option
This was referenced Nov 22, 2022
Open
Open
Open
This was referenced Nov 22, 2022
Open
Open
Open
This was referenced Nov 22, 2022
Open
Open
This was referenced Nov 23, 2022
Open
Open
Open
Open
Open
Open
This was referenced Nov 23, 2022
Open
Open
Open
This was referenced Apr 16, 2023
raffishquartan
pushed a commit
to raffishquartan/gatsby
that referenced
this pull request
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds a new
delayOnRouteUpdateoption togatsby-plugin-google-gtag, which is needed for correct pageview events when page transitions are in use. (e.g. with https://www.gatsbyjs.com/plugins/gatsby-plugin-transition-link/). Without this parameter, for sites that have route change animations, pageview events are logged based on the old page instead of the new page.This ports over a change that I made to the previous (now-deprecated)
gatsby-plugin-google-analytics: #15610. However, I've renamed the option todelayOnRouteUpdatewhich I think is more descriptive.Documentation
Updated the README for this plugin, similarly to #15610.
Related Issues
Fixes #15504