Twin-Cities-Mutual-Aid / twin-cities-aid-distribution-locations

A webapp to coordinate aid and care in the Twin Cities.
43 stars 32 forks source link

Remove test and localhost tracking from google analytics #270

Open amaxama opened 3 years ago

amaxama commented 3 years ago

I believe that events triggered from functional tests, netlify previews, and local development may be getting rolled into the rest of the google analytics dashboards and skewing the results on display there. It would be nice if we could extract any analytics from those sources so that dashboard only shows true production counts.

Dthurow commented 3 years ago

As part of testing my changes for #178, I was playing around on the google analytics reports. Looks like we can actually filter events by hostname, which then lets us see localhost and netlify preview domains. Below is a screenshot.

So I suspect we wouldn't even need to make a code change for this. If people are using the Google analytic dashboards and custom reports, I'd guess someone could just go in and change the reports everyone uses so they filter out localhost/netifly domain events.

If everyone is using their own custom reports or making them on the fly, then it might make sense to do a code change, so people wouldn't have to remember to filter those out. Not sure what the standard use case is!

image