[support] Google Analytics Module with subdomains

Jibran Ijaz jibran.ijaz at gmail.com
Sat Dec 17 03:54:00 UTC 2011


In the main site
If you have already enable the subdomain setting enabled in GA module then
you don't have to add javascript code it is just adding extra line .
Something like this
"var _gaq = _gaq || [];_gaq.push(["_setAccount",
"UA-123456789-1"]);_gaq.push(["_setDomainName", ".site.edu"]);var _gaq =
_gaq || [];

  _gaq.push(['_setAccount', 'UA-123456789-1']);

  _gaq.push(['_setDomainName', '.site.edu']);_gaq.push(["_trackPageview"]);"

And in your GA Account settings you also have to apply filters to add
domain name to uri and you can also create profiles (50 per GA account) for
each subdomain.
This link is helpful for GA settings
http://cutroni.com/blog/2007/11/19/tracking-sub-domains-with-google-analytics/


On Sat, Dec 17, 2011 at 1:40 AM, Broyhill, Gary <Gary.Broyhill at lr.edu>wrote:

> I have a main domain, www.site.edu and 85 subdomains (intranet.site.edu,
> faculty.site.edu, etc.). I am tracking the main domain and all subdomains
> on one report in GA using a single Web Property ID (UA-123456789-1)
>
> For the main domain, I set the the Google Analytics module as follows:
>
> Web Property ID: UA-123456789-1
> What domains are you tracking? One domain with multiple sub-domains.
> In the Advanced Settings/Javascript snippets, I added the following in the
> Code Snippet (before) box:
> var _gaq = _gaq || [];
>  _gaq.push(['_setAccount', 'UA-123456789-1']);
>  _gaq.push(['_setDomainName', '.site.edu']);
>
> For the sub-domains, I set the Google Analytics module as follows:
>
> Web Property ID: UA-123456789-1
> What domains are you tracking? A single domain.
> In the Advanced Settings/Javascript snippets, I added the following in the
> Code Snippet (before) box, per info obtained on the Google Analytics help
> pages:
> var _gaq = _gaq || [];
> _gaq.push(['_setAccount', 'UA-123456789-1']);
> _gaq.push(['_setDomainName', '.site.edu']);
>
> This all seems to work ok, except the following problem: on my GA Top
> Content report, I cannot tell where the hits came from. Example: my 24th
> highest entry is listed as \program.   That node appears on many of my
> subdomains. Is it aggregating every instance of \program across 85
> subdomains into one metric? If you click on it in the report, it gives a
> 404 error.
>
> If I go to the Content by Title view, it's a little better because I can
> see the names of the pages.
>
> I am wondering if I have everything set up correctly. If you are whiz at
> GA/Drupal and can tell if my settings are wrong, please let me know! They
> came about from much trial and error and digging through the GA help pages.
>
> Thanks!
>
> Gary Broyhill
> Lenoir-Rhyne University
> www.lr.edu
>
>
>
>
>
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Regards,
Jibran Ijaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20111217/819a3b2e/attachment.html 


More information about the support mailing list