Closed angel-tnc closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
staging-tiny-news-sites | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 13, 2023 1:03pm |
I'll merge this for the final verification that the approach works and address the comments on the follow-up PR with the releasable code.
Confirmed working in staging, will have the final PR soon,
Why
We wanted to test whether we could use
react-ga4
to capture the basic Google Analytics events.What
Enabled
react-ga4
and it is working with basic events.How to verify
Once this is merged and deployed to staging, the staging site accessed at https://next-tinynewsdemo.tinynewsco.dev/ will be wired for Google Analytics 4.
The measurement ID dashboard this code is sending data to is located at https://analytics.google.com/analytics/web/#/p377884938/reports/intelligenthome
In order to test, you should be able to see the traffic you have just generated being sent there, the best way to see it is the Realtime View at https://analytics.google.com/analytics/web/#/p377884938/realtime/overview
You can also see the traffic in the browser by looking under the Network tab on developer tools. GA4 page view endpoint looks like
collect?
, similar to the UA one.