A Night with GA Real time Tracking on Multiple Domains

Its been long time I was busy with some major tasks. But this task only gave me the new experience to share. I was working as per US-time zone from my Home in India. I was quite occupied with a lot of tasks in which one was multi domain tracking.

It was not a new topic for me, but I decided to do it in a new way. Now a catch till time most of webmaster use to think that our Google tracking code is domain specific. For example if you have a website www.xyz.com and a Google Analytics profile for same say UA-xxxxxx-x. Now what will happen if you paste same code on some other website www.abc.com ? Will it report data? I know most of you will say “NO”.

But the actual reply is yes. Even if you place some other domain tracking code to some other it will still report data to GA admin. If you want to test the same, follow the below instruction..

1. Create one new account on www.google.com/analytics … Wait a minute you need not to register again. Just login to existing account and select “Create New Profile” option.

2. Now get the code for any of your website..

3. Verify that code by applying on home page.

4. Now use the same code to other website which you own or blog.

5. If you have multiple computers/laptops then navigate that page on your website…

6. In you GA admin, click on Home tab, just before standard reporting

7. Check real-time data

Now the catch, you will not be able to get domain name. You will only get page data in real-time view, for example if you are navigating “www.abc.com/contact” then real-time will show you “/contact”.

See the screenshot below (This doesn’t have any data as its dummy):

Screen Shot 2012-07-27 at 9.52.15 PM

Now the question is how to get domain name in report if you have placed same tracking code on multiple domains? Don’t worry, just follow the below steps (Source: GA Support):

To show the domain in the page reports, set a filter to include all components of the page URL, as follows:

  • In the Profile Settings page, click the Add Filter link.
  • Choose Add New Filter and provide the filter a name.
  • Choose Custom Filter and select Advanced on the Filter type settings.
  • Under Advanced settings:
    • FieldA should be set to Hostname
    • FieldB should be set to Request URI
  • Set the values for both Field A and Field B to (.*), which is an expression that captures all characters.
  • Set the Output To –> Constructor option to Request URI and provide $A1$B1 as the value for that choice.
  • Your reports will now show:
    — sub.example.com/more.php

This will capture the http://www.example.com portion of your URL and include that at the beginning of your page URL in the content reports section.

See below screenshot:

Screen Shot 2012-07-27 at 10.31.35 PM

So, this is what I got to test via GA relatime in one night. I have tested it on https as well and also in mailers, it works everywhere. Now the question is: Its Good or Bad? I am writing on the same observation but meanwhile I leave it to you for commenting and let me know your views on this.



Its your turn to write me something or inputs on this blog post

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s