Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2819
Time to review: 15 mins
Changes proposed
This reorganizes how the application will grab Google Analytics IDs in difference scenarios in order to solve issues where non-production analytics data was making it into the production GA account. I laid out the scenarios in a comment on the ticket here #2819 (comment).
The change basically consists of removing GA IDs from Next code or .env files, and moving it to SSM / terraform.
This also adds some documentation, and removes an unused environment variable, both of which should hopefully reduce confusion and help to reduce the chance of this kind of problem down the line.
Context for reviewers
Test steps
npm run dev
and click around the appnpm run build && npm start
and click around the appBeyond this it is difficult to test without merging the change and checking GA after 24 hours, but that can be done if folks think it's necessary.
Additional information