Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
    
Is the development site at the same domain as the main one? –  Nick Sep 12 '12 at 10:02
    
Hi Nick - No both are on stand alone domains. –  Drew Sep 13 '12 at 0:15
add comment

1 Answer

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:

  1. From "Home" click on "Admin"
  2. Click on "filters"
  3. Click on "New filter"
  4. Make sure "Create new filter" is selected.
  5. Name your filter something useful such as "Test/Dev"
  6. Select "Custom Filter"
  7. Select "Include"
  8. In the "Filter Field" drop down, select "Hostname"
  9. If your dev site is, say, beta.beantin.se, you should put "beta.beantin.se" (without the quotes) as the filter pattern.
  10. Make sure "No" for case-sensitive is selected.
  11. Save your filter!
share|improve this answer
    
Thanks for this - Beantin. I'll give it a crack and see how we go. –  Drew Sep 13 '12 at 8:08
1  
Seems to be working a treat (filter) - thank you –  Drew Sep 14 '12 at 0:11
    
Great! Glad to have helped. –  Beantin Sep 16 '12 at 13:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.