Google Analytics with subdomains and aggregating data

I am building a network of sites that have a single main domain at example.com and several regional sites that use subdomains of the main one, such as:

  • example.com
  • site1.example.com
  • site2.example.com
  • I have two goals for setting up Google Analytics with this network, but I'm afraid it may be contradictory based on how GA works:

  • I want to give each subdomain its own GA account so that managers of the regional sites can see their stats, but not the other regional sites.

  • I want to be able to aggregate all of the regional site data with the national site data for executive management review.

  • While it's pretty easy to set each of these sites up with a Google Analytics account of their own, I don't know if this is the right way to go.

    Can I satisfy the requirements of goals #1 and #2 with Google Analytics? If yes, how can I best execute it?


    One way to do it would be to have your page code point to the same profile (same UA-XXXXXXX-X) but setup separate profiles based on that same profile, and use filters to send data based on the sub domains.

    That way you don't need to mess with having multiple versions of your page code. But, you will need to add to your page code for all your pages (on all your subdomains) the following (before the trackPageview call), to make sure all subdomains are tracked:

    _gaq.push(['_setDomainName', '.example.com']); 
    

    Then you would apply filter to each profile with:

    Filter Name: site1 traffic
    (Predefined filter)
    Filter type (dropdown values): Include only : traffic from the domains : that are equal to
    Domain: site1.example.com
    

    Do that for each profile you setup for each siteX

    As far as #2, you'd just have the first profile you spawned all those other profiles off of (above) as a "global rollup" without any filters, so it will get all the traffic.

    And you can specify who has access to what profiles in the profile editor.

    One bummer is that you will need to go in and setup your goal(s) individually in each profile.

    链接地址: http://www.djcxy.com/p/63256.html

    上一篇: 子域名作为过滤器(Google AnalyticsAPI)

    下一篇: 谷歌分析与子域和聚合数据