-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Support Google Analytics 4 #36123
Conversation
Netlify deploy previewhttps://deploy-preview-36123--material-ui.netlify.app/ Bundle size report |
@alexfauquette I don't have other comments. May be best to let @oliviertassinari do the final review (I don't have full context related to GA). |
@alexfauquette Thanks for working on this! The most complex GA integration we have is with the store, where I integrated the e-commerce features: https://developers.google.com/analytics/devguides/collection/ga4/ecommerce. To be fair, I had little use for these e-commerce analytics in the past. But in any case, GA on the docs should be much simpler. I hope I can find time to review it. |
@oliviertassinari I don't get your point, about GA integration with the store. The store is in a distinct repo, so it will be a distinct PR. Especially it's more about checking the event sent are still in the correct format for GA4. |
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.
I don't get your point, about GA integration with the store. The store is in a distinct repo, so it will be a distinct PR. Especially it's more about checking the event sent are still in the correct format for GA4.
Right, sorry, I mean that the website/docs is a simpler case.
I have spent about 2 more hours on this. I initially had no data at all on https://analytics.google.com/analytics/web/?authuser=1#/p354125369/realtime/overview?params=_u..nav%3Dmaui&collectionId=life-cycle. I have made the changes up to the point where I would get coherent data in this dev environment. "Coherent" in the sense of matching how I navigate the docs. I don't see any issues anymore but who knows 🤷♂️.
From what I understand, we can't migrate the data from UA to GA4. I guess we can dual tag for 1 year until we have enough historical data to compare YoY https://webmasters.stackexchange.com/questions/135970/google-analytics-is-there-a-way-to-import-universal-analytics-property-data-in.
adc800a
to
9901823
Compare
They promise to keep UA data for 6 months: https://support.google.com/analytics/answer/11583528?hl=en So to analyze data from one year to another it might be interesting to export them |
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.
Ok, so the sooner we dual collect the better. I have rebased the PR and did another small clean-up. From the quick test I did locally, navigating 3 pages:
the dashboard seems to update correctly, https://analytics.google.com/analytics/web/#/p354125369/realtime/overview
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
fcab352
to
1a22c61
Compare
Seems to be working. Maybe it can be merged, to get time to check all the metrics are the same between UA token and GA4 token
If I'm correct, the behavior is to push events in
window.dataLayer
which will be used by the script fromhttps://www.googletagmanager.com/gtag/js
to send data to Google AnalyticsThe few visitors in prod before merging, it's me doing tests :)