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

USWDS-Site: Remove legacy UA Google tracking code #3035

Open
amycole501 opened this issue Dec 30, 2024 · 1 comment
Open

USWDS-Site: Remove legacy UA Google tracking code #3035

amycole501 opened this issue Dec 30, 2024 · 1 comment
Assignees
Labels
Affects: Analytics Relates to analytics data Status: Triage We're triaging this issue and grooming if necessary

Comments

@amycole501
Copy link

amycole501 commented Dec 30, 2024

The legacy Universal Analytics (UA) tracking code is no longer collecting data. Google recommends removing it. Dan approved removing it

https://designsystem.digital.gov/

Image

This should make a slight improvement on our site speed by removing unused JS.

This is the code to be removed from the header:

<!-- UA -->
--
  | <script>
  | window.ga=window.ga\|\|function(){(ga.q=ga.q\|\|[]).push(arguments)};ga.l=+new Date;
  | ga('create', 'UA-48605964-43', 'gsa.gov');
  | ga('send', 'pageview');
  | // anonymize user IPs (chops off the last IP triplet)
  | ga('set', 'anonymizeIp', true);
  |  
  | // forces SSL even if the page were somehow loaded over http://
  | ga('set', 'forceSSL', true);
  |  
  | ga('send', 'pageview');
  | </script>
  | <script async src='https://www.google-analytics.com/analytics.js'></script>

@amycole501 amycole501 added the Affects: Analytics Relates to analytics data label Dec 30, 2024
@github-actions github-actions bot added the Status: Triage We're triaging this issue and grooming if necessary label Dec 30, 2024
@amyleadem amyleadem changed the title Remove legacy UA Google tracking code USWDS-Site: Remove legacy UA Google tracking code Jan 2, 2025
@amyleadem amyleadem removed this from the USWDS release: January 2025 milestone Jan 2, 2025
@amycole501
Copy link
Author

Confirmed with analytics experts at GSA that this code is OK to remove from the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Analytics Relates to analytics data Status: Triage We're triaging this issue and grooming if necessary
Projects
Status: No status
Development

No branches or pull requests

3 participants