Putting Analytics on a sub-domain page

Discussion in 'Google Analytics' started by dinrock, Dec 28, 2010.

  1. #1
    I use Analytics on this page.....how can I use it to track a new page I've added to this same site? Please don't say "just add it"....what are the actual steps I need to take to get this accomplished? Set up a new account for the new page? Or?
     
    dinrock, Dec 28, 2010 IP
  2. animebuzz.tv

    animebuzz.tv Peon

    Messages:
    317
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you don't need to setup a new account and just use the same code you've pasted on your main site unless you have different site.
     
    animebuzz.tv, Dec 28, 2010 IP
  3. techbrij

    techbrij Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    a default setup of Google Analytics is designed to track content and visitor data for a single domain, such as www dot example.info. This means that even if you manage both a domain and a sub-domain, you must make modifications to the tracking code in order to share visitor data across both domains.

    Suppose you have the following URLs that you want to track as a single entity:

    example-petstore.info
    dogs.example-petstore.info
    cats.example-petstore.info

    For this setup, you would use the following key customizations for the tracking code on all three domains.

    Asynchronous syntax

    //Tracking code customizations only
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-12345-1']);
    _gaq.push(['_setDomainName', '.example-petstore.info']);
    _gaq.push(['_setAllowHash', false]);
    _gaq.push(['_trackPageview']);

    You will not have to make any adjustments to the links or forms between these three sites, since they can all share the same cookies due to the fact that you set the domain name to the top-level domain (e.g., .example-petstore.info).
     
    techbrij, Dec 28, 2010 IP
  4. indiahosting123

    indiahosting123 Guest

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    techbrij answer is correct if we want to track the different subdomain in the same report we put this function in the subdomain page of our site
     
    indiahosting123, Dec 29, 2010 IP