Hi Clayton,

Here is a sample GA code:

                try {
                        var pageTracker = 
_gat._getTracker("UA-FOR_WWW.LIBRARY.YALE.EDU");
                        pageTracker._setDomainName("none");
                                                
pageTracker._setAllowLinker(true);
                        pageTracker._trackPageview();
                        var pageTracker2 = 
_gat._getTracker("UA-FOR_RESOURCES.LIBRARY.LIBRARY.YALE.EDU"); 
                                               
pageTracker2._setDomainName("library.yale.edu");
                                               pageTracker2._trackPageview();
                } catch(err) {}

-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of 
Predmore, Andrew
Sent: Monday, February 06, 2012 12:55 PM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains

Thank you for your help.  But, there appears to be another problem.  The main 
landing page is on www.library.yale.edu, but almost every link of that page 
goes to resources.library.yale.edu.  Right now, I am seeing a 98% drop-off from 
the home page.  It looks like Google is not tracking the visit across the 
sub-domains.

Is there a way to fix this?

--
Clayton "Andrew" Predmore
Manager, Web Operations
Yale University Library
andrew.predm...@yale.edu






On 2/6/12 3:10 PM, "BRIAN TINGLE" <brian.tingle.cdlib....@gmail.com> wrote:

>This can be really tricky to get right when you have a more complicated
>site with lots of domains.  Since you are all on .yale.edu it should be
>easier than crossing .cdlib.org to .universityofcalifornia.edu.  If I
>understand correctly, you should be able to
>_gaq.push(['_setDomainName', '.yale.edu']); on every page and it should
>work.
>
>http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#do
>mainSubDomains 
>
>This debugging plugin for chrome is pretty useful
>
>https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna
>
>It will help you confirm what is getting sent to google.
>
>-- Brian
>
>On Feb 6, 2012, at 11:53 AM, Predmore, Andrew wrote:
>
>> I have been tasked with updating the Analytics for the Yale University
>>Library, and I am having quite a bit of trouble.
>> 
>> Specifically, I was hoping to only track domain names that included
>>library.yale.edu, like www.library.yale.edu,
>>resources.library.yale.edu, but the instructions don't seem to cover
>>sub-sub-domains like this.
>> 
>> Also, I was hoping to set up a profile/filter that would show me the
>>sub-domains in the reports.  Again, I followed the directions but I am
>>not getting any results.  Well, that's not entirely true the reports are
>>showing about 30 visitors a day (and no page hits, how is that
>>possible?).  The main profile is showing 5,000  10,000 visitors day.
>> 
>> Does anyone have experience with this that could help me out?  Maybe
>>there is even someone from Google at the conference?
>> 
>> --
>> Clayton "Andrew" Predmore
>> Manager, Web Operations
>> Yale University Library
>> andrew.predm...@yale.edu<mailto:andrew.predm...@yale.edu>

Reply via email to