We are planning to use Google Analytics in our organization and I am in charge for setting it up. I was wondering how to deal with multiple environments. We sure do not want to collect data during development and QA (or maybe collect data to a different analytics account), but we want to when the site goes to production (obviously).
- How do you deal with multiple environments and Google Analytics ?
- Do you setup multiple accounts for Google Analytics and use either one depending on the environement ?
We're using ASP.NET 2.0, if that matters.
Best Answer
Another option would be Google Analytics profiles. Use the same account in all environments, but add a hostname filter in each profile to only include traffic from the respective environment.
For example, if your internal QA environment is
qa.example.com
, create a "QA" profile in Google Analytics with a custom filter to only include hostnames matching^qa\.example\.com$
. In your "Production" profile, do the opposite and exclude traffic from internal hostnames.