-
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
Gatsby Script Api: partytown service worker only register in the index page #37024
Comments
Give me chance to solve this issue. |
It shouldn't make a difference, but I have a similar setup working properly on https://www.giancolianswers.com that adds the script using |
The next shot-in-the-dark would be to try with React 17 and React-Dom 17. |
Hi @twodft, I was able to reproduce this when using the For now I've opened #37402 to document this limitation. A fix is something that is probably possible but I can't prioritize at the moment. At the very least there is a workaround available via the Some breadcrumbs if anyone (or my future self) is interested in picking this up:
|
Preliminary Checks
Description
Using the Gatsby Script API's
off-main-thread
strategy to implement Google Analytics on my website, and found the partytown service workerpartytown-sw.js
only registers through the index page endpoint, which means Google Analytics script will only work when the user visits my site start from the homepage.Note: I have double-checked that this is not a bug from upstream Partytown
Reproduction Link
https://github.com/twodft/gatsby-script-component-google-analytics-issue
Steps to Reproduce
...
Expected Result
When using Gatsby Script's
off-main-thread
strategy, the partytown service worker should be able to register on any page, not only just from the index page.Actual Result
partytown service worker would not register on other pages except the index page
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: