-
Notifications
You must be signed in to change notification settings - Fork 104
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
Public Sans - Bug: GA4 tracking code troubleshooting #337
Comments
Let's confirm that code. Here's what's in this issue:
Here's what's currently in the
The difference is the
The new config section is the one that looks wrong. Amy, can you confirm? |
@thisisdano just forwarded you an email where I copied the new tracking code. You can double check but I copied the code below out of the email from the tracking team: <script async src="https://www.googletagmanager.com/gtag/js?id=G-HBYXWFP794"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', ' gtag('config', 'G-HBYXWFP794'); </script>It's possible we should reach out to the tracking team to confirm there's not an issue. |
@amycole501 you can use three backticks at the start and end of code to make a code block1. Alternatively, you can highlight your block of code and press the code button. It should create the block for you. The tag you mentioned shows gtag twice:
But aside from that it matches what's currently in the Footnotes |
The code is now working; there was a missing filter at the property level that someone on the data side fixed for us. However the code at the bottom of the page still needs to be removed. It's not helping to collect any information and is unnecessary: See note above under "expected behavior" for not having double code added to the site. Once completed let me know to make sure to check in GA4 that the code is still collecting data appropriately. |
@amycole501, right. I've removed that in the pull request1. Footnotes |
Ready for your review @thisisdano |
Describe the bug
No data is coming into the GA4 report. It's possible it's because there is now duplicate code on the page. We should troubleshoot until the data appears. Related to issue #322
Please let me know once the update is made and I can refresh the data in GA4 (probably wait a day or so) then check to see if it's working. If removing the code doesn't work we can continue to troubleshoot.
Steps to reproduce the bug
Expected Behavior
This code is the only GA4 tracking code needed on the site along with instructions:
Below is the Google tag for this account. Copy and paste it in the code of every page of your website, immediately after the element. Don’t add more than one Google tag to each page.
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HBYXWFP794"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', ' gtag('config', 'G-HBYXWFP794'); </script>Related code
No response
Screenshots
No response
System setup
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: