-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
SvelteKit doesn't work well with Google Tag Manager #11752
Comments
That GTM setup is non-standard and incorrect, this isn't a SvelteKit issue. The easiest solution is to pull the tag from GTM and add it to your If you need to place it in
And add the
|
I have tried copy/paste from the tutorial to They all lead to the same result. @whalderman can you test or suggest me a working repo? I made the reproduction repo in the issue description. |
@benmccann can you reopen the issue please. It's not completed 😗 |
It's not a SvelteKit bug. It's better to ask for help on Discord or StackOverflow |
I have tried replace Google Tag Manager with Cloudflare Zaraz SPA compat, too. Nothing can capture the history change event of SvelteKit 😞 |
Did you update to the latest version of SvelteKit? There was a bug in early versions of 2.x |
It does! #11657 Now my app reports correctly! ❤️ |
Describe the bug
GTM correctly loads at the beginning
However, it's not able to detect events of clicking on links and can only detect the first form event; any form submits after the first one is not recorded.
Reproduction
Github Repo
sk-gtm-bug.pages.dev
Summary code:
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
You can create a new TAG account here: Google Tag Manager
The text was updated successfully, but these errors were encountered: