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

Disable Google Analytics for dev, staging and test accounts #462

Open
austinhallock opened this issue Jun 23, 2020 · 1 comment
Open

Disable Google Analytics for dev, staging and test accounts #462

austinhallock opened this issue Jun 23, 2020 · 1 comment

Comments

@austinhallock
Copy link
Contributor

Google Analytics is used here and here

To prevent bad data, it should only load for actual users on production. Alternatively there could be a different GA property id for test/staging environments

I'm not really sure off the top of my head how to disable it in the index.html. I'd probably just move the gtag('config'... to a separate part of the app where you have access to env vars to see if it's production.

Ideally it'd ignore test/demo users for the isVolunteer and isAuthenticated dimensions (set in router.js), but that's probably not as necessary

@thedevelopnik
Copy link
Member

thedevelopnik commented Sep 29, 2020

vue-gtag might solve this.

Take it out of index.html completely and then selectively load based on env vars during build-time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants