1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sub Domain Tracking Help!

Discussion in 'Google Analytics' started by hoodaki, Jan 11, 2013.

  1. #1
    I want to track subdomain tracking for my website and as I have studied I do steps like:

    e.g url: www.domainname.com and sub domain: online.domainname.com

    Step 1: I have enable the sub domain tracking from Admin->Tracking Info

    Step 2: I have place the same given below code on my domain and sub domain as google provides me an update version code with _setDomainName field.

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
    _gaq.push(['_setDomainName', 'domainname.com']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


    Step 3: Then I have created a new profile for sub domain: online.domainname.com

    Step 4: I have created a custom filter with Include option for this profile.

    Hostname: online\.domainname\.com

    After 24 hrs I have received the data in the filter profile.

    Problem Declaration:

    1. What I am facing that, all traffic is showing as Direct Traffic
    2. When I go through with the landing pages report, when I click on any url all of them start with www.domainname.com rather then online.domainname.com; because of this all url could not be found on website.
    3. No Goal URL is captured till now

    Please let me any step is missing from my end for subdomain tracking. So that I will do it now.
    hoodaki, Jan 11, 2013 IP
  2. drjackson

    drjackson Greenhorn

    Likes Received:
    Best Answers:
    Trophy Points:
    I forgot how I set mine up, ill go have a look and let you know
    drjackson, Jan 11, 2013 IP
  3. kaliborobb

    kaliborobb Member

    Likes Received:
    Best Answers:
    Trophy Points:
    The best way to track sub-domain is to add new website under this account and generate new analytics code for this sub-domain only. Just insert the newly created code into all pages of this sub-domain and it will start working fine for sure.
    kaliborobb, Jan 12, 2013 IP