Refactor Google analytics tag tracking to separate environments #3015
Labels
Priority: Medium
This should eventually get assigned
Stack: Front End
The issue pertains to the front end
Type: Enhancement
New feature or request
Currently, we use gatsby-plugin-google-gtag to configure our site with the given Google Analytics tag.
At the moment, this always ends up instrumenting the site in all environments (local, CI/CD, staging, production) with the same tag. To identify production traffic in the analytics we have to filter by host name to incidentdatabase.ai -- but this restricts access to some analytics features or makes them harder to use.
We should refactor so that either the tag is only present in production environments.
Alternatively, if there are better ways to separate environments for the sake of analytics, we can do that.
aiid/site/gatsby-site/gatsby-config.js
Line 67 in f10e79b
The text was updated successfully, but these errors were encountered: