Jibran,
Thanks for your help about not adding the extra javascript code, and also about adding filters to create the profiles. I'll check out that link.
Gary
Message: 4 Date: Sat, 17 Dec 2011 08:54:00 +0500 From: Jibran Ijaz jibran.ijaz@gmail.com Subject: Re: [support] Google Analytics Module with subdomains To: support@drupal.org Message-ID: CAJBg=jnS9uTWdhb2B_rsikPHnPerDsy+ko8G93ongmf5Oq4YpA@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
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-analyt ics/
On Sat, Dec 17, 2011 at 1:40 AM, Broyhill, Gary Gary.Broyhill@lr.eduwrote:
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