-
Notifications
You must be signed in to change notification settings - Fork 509
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
feat(google-analytics): migrate to gtag.js with dual tagging #10687
Conversation
b8b9dd5
to
5848654
Compare
5848654
to
1983b5c
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
fa76f36
to
f0ff79a
Compare
We have been using `analytics.js`, which is being deprecated.
f0ff79a
to
1884ff5
Compare
1884ff5
to
0dd6f31
Compare
FWIW Dual tagging looks fine on stage: https://developer.allizom.org/static/js/gtag.js |
@@ -123,7 +123,7 @@ test("content built foo page", () => { | |||
|
|||
// The HTML should contain the Google Analytics snippet. | |||
// The ID should match what's set in `.env.testing`. |
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.
Is the ID actually being checked?
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.
Looks fine, just one tiny comment/question
Summary
(MP-951)
Problem
We have been using
analytics.js
, which is being deprecated (see here), and we want to smoothly transition from UA to GA4 using dual tagging (see here).Solution
Migrate to
gtag.js
, and support multiple measurement ids.How did you test this change?
Kicked off a stage deployment.
Ran
BUILD_GOOGLE_ANALYTICS_MEASUREMENT_ID=foo,bar yarn tool google-analytics-code
and manually checked the result inclient/build/static/js/gtag.js
: