Repository navigation
fix(google-tag-manager): Update to latest src - #5731
shawnmclean wants to merge 1 commit into
Conversation
|
Hi @shawnmclean! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
✔️ [V2] 🔨 Explore the source changes: 65c665b 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/616cce40ea930300070d837a 😎 Browse the preview: https://deploy-preview-5731--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5731--docusaurus-2.netlify.app/ |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
1 similar comment
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
| attributes: { | ||
| async: true, | ||
| src: `https://www.googletagmanager.com/gtag/js?id=${trackingID}`, | ||
| src: `https://www.googletagmanager.com/gtm.js?id=${trackingID}`, |
There was a problem hiding this comment.
This url does not work for me:
Please show me exactly where you found this, eventually showing a print screen of the doc if there's no possible linking.
(UA-141789564-1 is Docusaurus trackingId)
There was a problem hiding this comment.
This plugin is for gtag (global site tag). gtm (google tag manager) is a different, confusingly similar named google thing, and is not what this plugin does.
AFAIK this is still the correct way to use the global site tag, which is still the current recommended way for running just analytics, including the newest GA4. For a gtm plugin, you should make a separate plugin (you could use gtag as a reference) that uses gtm.js instead.
Also remember, this is technically a SPA, so you may need to adjust 3rd party analytics you load via GTM to trigger off "page views", or also as plugin and onRouteUpdate.
There was a problem hiding this comment.
Thanks @dsmmcken , agree all this is confusing, we need a plugin for ga, gtm, gtag... 🤪
I'll close this PR for now, and re-open if you can convince me with ref doc that the changes are legit
Motivation
I'm using google tag manager assistant to debug a container. I kept getting script load errors, after some digging and comparing the network request against a known working page, I found that docusaurus is using an outdated script.
The new documentation is found at: https://developers.google.com/tag-manager/quickstart
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Debugging from GTM works.
Before change:
After change:
