-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
docs: remove mention of 'UA-' in gtag #6184
Conversation
Never used ganalytics myself, and the doc isn't very clear wrt what's the difference between GA4 and UA... Since we are using this tracking ID to send requests to the GA server, would both of them work? Or is it just that |
✔️ [V2] 🔨 Explore the source changes: 24e2fa8 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61c57a52c9e67b0007fb5f9c 😎 Browse the preview: https://deploy-preview-6184--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6184--docusaurus-2.netlify.app/ |
It's closer to this - if you're setting up a google tags property you simply won't have a "UA-" prefix - GA 4 properties have a different format. Here's a screenshot of my own tag as an example: See the Users may be using Google Analytics or GA4 - giving them information that isn't confusing is the goal 😄 I thought I was doing something wrong until I realised that GA4 does not have a UA- prefix. |
We also have the thread #2407 where the discussion seems to have shifted to UA vs GA4 in terms of data privacy. Wondering if we should also put up a notice about the nuance between |
Maybe - I'm not too sure of the GDPR implications to be honest. My sense is that Google want to deprecate UA and have people migrate to GA4 (I was prompted in Google Analytics which is what lead me to investigating using GA4). The motivation of this PR is just docs really though; if someone is setting up a google tag they will not have a "UA-" prefixed property, so the aim is to make the docs reflect that. To show you what UA vs GA4 looks like side by side consider the following: The one above ( See this code for an example of side by side usage: https://github.com/johnnyreilly/blog.johnnyreilly.com/blob/3b7fc346897a15f0752f294bd7515789428938c2/blog-website/docusaurus.config.js#L29-L34 |
I'm in favor of changing our doc's defaults, just asking about whether the old config still makes sense for UA users. My idea is to add an admonition briefly explaining that legacy UA IDs have the |
Oh totally - the existing UA docs are fine. My sense is, that whilst Google are keen for people to upgrade to GA 4, UA will still be around for a decent time to come. |
Feel free to tweak my PR. I'm going to be offline for a while; will be checking my phone a bit |
The gtag stuff is always a bit messy for me🤦♂️ A while back I learned that GTAG and GTM may be different (#5731). And now I'm trying to differentiate between GA3/UA, GA4, GTAG, GTM—X is a superset of Y, W is a successor of Z... I guess we don't need more information since the tracking ID is given by GTAG anyways and existing users probably know what they are doing. My only question is whether we should synchronize the docs in the GA plugin, and whether that plugin still works in GA4 (if not, we need to put up a notice / update the plugin) |
The GA plugin docs are fine and don't need changing. From a Docusaurus perspective, GA and GA4 are different products. GA plugin does not support GA4 and vice versa. It's likely that one day GA will disappear and GA4 will live on - but I would expect that to be a very long time in the future.
Haha - yeah I'm not an expert to be sure! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the GA4 ID works for GTAG plugin—let's do it!
Motivation
To make the gtag docs less confusing.
To quote the docs here: https://support.google.com/analytics/answer/9744165?hl=en-GB&utm_id=ad#use_existing_tags
The docs as is suggest that gtag's should include "UA-" as universal analytics does. This PR amends that to make it less confusing.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
n/a
Related PRs