Tech Learner
Tech Learner

Reputation: 1317

Google Analytics - Universal Analytics code tracks two environments

I am using Google's Universal Analytics in MVC application for Page visits tracking purpose. I have three environments(i.e, Dev , Test & UAT) to test my code and as a primary user I have access to all three environments.

After initial test the code has been moved to Test environment from Dev environment. And again the code has been moved to UAT environment. Now the code resides in all three environments.

In my google analytics website, I have given UAT environment URL(domain name) alone for tracking purpose but now the problem is, when I login into Test and UAT environments it tracks both. When I navigate to different page in Test environment it tracks my navigation page.

As I mentioned above, I have given UAT domain name in GA website. And I want to track UAT alone and not other environments.

Do I need to configure any settings in Google Anlytics website?

Any suggestion please. Thanks in advance.

Upvotes: 0

Views: 240

Answers (2)

nyuen
nyuen

Reputation: 8907

Since you've got GTM tagged to your question, there are several possible options and I'm assuming that all your environments use the same container. Probably the quickest solution would be to use the Hostname variable in your trigger. You can then set your pageview tag to fire only if you are on UAT based on the hostname.

Upvotes: 2

Tech Learner
Tech Learner

Reputation: 1317

It seems you are facing cross domain issue. Try to include your Test URL in Referral Exclusion List in Google Analytics site.

Admin --> Property Settings --> Referral Exclusion List --> Add your test domain name.

Upvotes: -1

Related Questions