Mobile app version of vmapp.org
Login or Join
Ogunnowo487

: GA UA codes for testing site - set up Anyone know the process for using a GA live UA code to test a site in development. I.e. I have a live site with a GA UA code attached, tracking live

@Ogunnowo487

Posted in: #Development #GoogleAnalytics #Testing

Anyone know the process for using a GA live UA code to test a site in development. I.e. I have a live site with a GA UA code attached, tracking live traffic data etc e.g. UA-123456.

I've been told that there is a way to produce another code associated to the primary code to use on the testing version of my live site e.g. test code could be UA-123457.

Can anyone shed some light on this?

If not possible should I just set up a completely separate GA account for my testing site?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo487

1 Comments

Sorted by latest first Latest Oldest Best

 

@XinRu657

There are a couple of ways you could achieve this, depending on how your test/dev site is set up.

You could use a completely separate GA account and UA code - one of the risks with this is that you forget to change the code when you eventually deploy the site (or forget to change it again after some further changes in the future).

The other option is to create an additional profile within your "live" account. In that profile, add a filter that includes just the data from your test site.

You then need to make sure you exclude your test data from your "live" profile.

Presuming your test/dev site is on another (sub) domain, then the following filter in a new profile would work:


From "Home" click on "Admin"
Click on "filters"
Click on "New filter"
Make sure "Create new filter" is selected.
Name your filter something useful such as "Test/Dev"
Select "Custom Filter"
Select "Include"
In the "Filter Field" drop down, select "Hostname"
If your dev site is, say, beta.beantin.se, you should put "beta.beantin.se" (without the quotes) as the filter pattern.
Make sure "No" for case-sensitive is selected.
Save your filter!

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme