-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Not working with Google Analytics 4 #7662
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
Comments
Does your analytics code look like Our current analytics code is here: https://github.com/readthedocs/readthedocs.org/blob/master/media/javascript/readthedocs-analytics.js -- is there a new client JS for GA4? |
Yes, the javascript for GA4 is here: The |
I've the same problem, code start with Thanks for fixing the bug. |
I am looking at this and I have a few bits to work out before we have a solution. In the current setup, Read the Docs attaches its own GA code as well as any user analytics code. Hopefully we can still support that. Other visitors can disable GA by using the do not track feature of their browser and project authors can disable GA entirely for their documentation. These features should still be supported.
|
I have a pending fix if any of the affected users would like to take a look: #7691 |
@bcb the fix is live now, can you confirm is working for you? |
Yes I’m seeing numbers now. One small note, you might want a separate field for each GA code, because I think 4 is meant to be able to run alongside the previous generation, so it’s possible someone might want to have both at once. But for me, I just went straight to using 4. Thanks for resolving! |
Details
Expected Result
Google Analytics 4 launched recently and I upgraded. Updated my GA code in both the RTD web UI and in conf.py, expecting to see stats.
Actual Result
Getting zeroes in GA.
The text was updated successfully, but these errors were encountered: