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

RFC: Remove Google Universal Analytics script #2547

Closed
1 of 3 tasks
coliff opened this issue Jun 24, 2021 · 2 comments · Fixed by #2616
Closed
1 of 3 tasks

RFC: Remove Google Universal Analytics script #2547

coliff opened this issue Jun 24, 2021 · 2 comments · Fixed by #2616
Assignees
Milestone

Comments

@coliff
Copy link
Member

coliff commented Jun 24, 2021

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (below))

Setting up a new Google Analytics tracking ID provides a new Google Analytics 4 ID (starts with G-) and no longer provides a Universal Analytics tracking ID (starting with UA-). As such, the script we include by default in HTML5 Boilerplate is no longer useful to users creating a new site. Google Analytics 4 has been the default for a while now

Google Analytics 4 is very different to Universal Analytics and actually includes many of the features which we're written about in our docs and provided custom JavaScript for such as, automatically anonymizing the full IP address,

Google do not recommend Universal Analytics being installed on new sites and are actively contacting users who are still using Universal Analytics to upgrade to GA4 so I think it's time to remove the Universal Analytics script from index.html. It could be possible to replace the script with the GA4 script, but I don't think it provides any value to anyone since the script is exactly the same as what Google provides:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1234567890"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-M00XN4KSVF');
</script>
@roblarsen
Copy link
Member

A certain subset of our audience will be happy to hear this. I agree.

@roblarsen roblarsen self-assigned this Jun 25, 2021
@roblarsen roblarsen added this to the v9.0.0 milestone Aug 16, 2021
@coliff
Copy link
Member Author

coliff commented Oct 14, 2021

We should look to get this done. Google are now quite aggressively nagging users to upgrade from Universal Analytics to GA4. 😅

roblarsen added a commit that referenced this issue Oct 15, 2021
@roblarsen roblarsen mentioned this issue Oct 15, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants