news-catalyst / next-tinynewsdemo

Frontend for Tiny News Collective organizations
https://next-tinynewsdemo.vercel.app
1 stars 0 forks source link

Preliminary code for ga4 basic metrics #1334

Closed angel-tnc closed 1 year ago

angel-tnc commented 1 year ago

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.

vercel[bot] commented 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
2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **tiny-news-curriculum** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-curriculum/G7JnGLhvjxBteKw4LCswyxpjGpFt)) | | | Jun 13, 2023 1:03pm | | **tiny-news-sites** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-sites/G24ZMKaXhHanphqdQDHGBQvVyNAu)) | | | Jun 13, 2023 1:03pm |
angel-tnc commented 1 year ago

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.

angel-tnc commented 1 year ago

Confirmed working in staging, will have the final PR soon,