Skip to content
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

[Issue #2819] disable ga in test #3001

Merged
merged 7 commits into from
Nov 25, 2024
Merged

Conversation

doug-s-nava
Copy link
Collaborator

@doug-s-nava doug-s-nava commented Nov 22, 2024

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

  1. run npm run dev and click around the app
  2. run npm run build && npm start and click around the app
  3. VERIFY: using omnibug or similar tool, verify that no requests to GA are going out

Beyond 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.

  1. merge the change
  2. wait 24 hours
  3. VERIFY: GA prod account no longer shows any traffic coming from localhost

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

@doug-s-nava doug-s-nava marked this pull request as ready for review November 22, 2024 21:06
Copy link
Collaborator

@mdragon mdragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was worse than I expected but I like where you arrived at.

@doug-s-nava doug-s-nava merged commit 4acc5ca into main Nov 25, 2024
19 checks passed
@doug-s-nava doug-s-nava deleted the dschrashun/2819-disable-ga-in-test branch November 25, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local testing logging to Prod GA Property
2 participants