Adding the google analytics scripts as outlined here https://nextjs.org/docs/messages/next-script-for-ga
And adding a .env file to store the GA ID as outlined here https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables
Details
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABCb2c8bc45ef51: [e.cash] Add google analytics script
preview the site and check the scripts are loading properly
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
With GA4, the ID we need here is different from the property ID. Here's the <script> from our analytics dashboard:
<!-- Google tag (gtag.js) --> <script async src=`https://www.googletagmanager.com/gtag/js?id=${GOOGLE_ANALYTICS_ID}`></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', GOOGLE_ANALYTICS_ID); </script>
Comment Actions
Build Bitcoin ABC Diffs / Diff Testing (preview-e.cash) passed.
Preview is available at http://54.39.104.128:41296 for the next 60 minutes.