Skip to content
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: Fix G4 tracking code #322

Closed
2 tasks done
amycole501 opened this issue Oct 18, 2024 · 3 comments · Fixed by #292
Closed
2 tasks done

Public Sans - Bug: Fix G4 tracking code #322

amycole501 opened this issue Oct 18, 2024 · 3 comments · Fixed by #292
Assignees
Labels

Comments

@amycole501
Copy link

Describe the bug

Below is the G4 tracking code that needs to be placed on the Public sans website. Place the code right AFTER the HTML element. (use this resource for more info)

<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>

Steps to reproduce the bug

Currently the above mentioned code is not on the site as far as I can tell. Furthermore, the code that IS on the site is not in the correct place.

  1. Go to public sans
  2. View page source
  3. Note that the only google code on the page is at the very bottom. And it's not G4 tracking code.
--   | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-47271808-2"></script>   | <script>   | window.dataLayer = window.dataLayer \|\| [];   | function gtag(){dataLayer.push(arguments);}   | gtag('js', new Date());   |     | gtag('config', 'UA-47271808-2');

Expected Behavior

The code should be placed right after the element for proper tracking.

Related code

No response

Screenshots

No response

System setup

No response

Additional context

No response

Code of Conduct

@amycole501 amycole501 added Needs: Confirmation We need to confirm that this is an issue Type: Bug A problem in the code labels Oct 18, 2024
@github-actions github-actions bot added the Status: Triage We're triaging this issue and grooming if necessary label Oct 18, 2024
@amycole501
Copy link
Author

This needs to be fixed ASAP.
Image

@mejiaj mejiaj moved this to Scheduled in USWDS Core Project Data Dec 30, 2024
@mejiaj mejiaj removed Status: Triage We're triaging this issue and grooming if necessary Needs: Confirmation We need to confirm that this is an issue labels Dec 30, 2024
@mejiaj
Copy link
Contributor

mejiaj commented Dec 30, 2024

@amycole501 confirming that the GA4 tracking code on develop is in the correct place and this this will be resolved once #292 gets merged.

@mejiaj mejiaj linked a pull request Dec 30, 2024 that will close this issue
@amyleadem amyleadem moved this from Scheduled to Done in USWDS Core Project Data Jan 6, 2025
@mejiaj
Copy link
Contributor

mejiaj commented Jan 6, 2025

Closing as it this work was done in #292.

@mejiaj mejiaj closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants