Print

Print


Henry, that is what you need to do if you want to track the same page to
two different google analytics properties and you are using the
legacy synchronous code.  It sounds like yale wants to collect all this use
under one UA- google analytics property (it is just that the property spans
multiple subdomains).

I think the link I sent to

http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html<http://%22>

addresses the yale case; and I the way I read it adding this:

 _gaq.push(['_setDomainName', '.yale.edu']);

Or  _gaq.push(['_setDomainName', 'library.yale.edu']);

on _every_ page should  work.

Right now, I only see _setDomainName on the home page.  If this is not the
_same_ on all the pages, the cookies won't be shared as users move between
the sites.

For example;

view-source:http://www.library.yale.edu/researcheducation/

This page is missing

_gaq.push(['_setDomainName', '.yale.edu']);

 It will only work prospectively (it won't change the past) but when all
pages are sharing the same _setDomainName then they should all share the
same cookies and the links between pages should be counted correctly.

But google analytics can get tricky, just when I think I understand
something it changes.  I find I have to double check things a lot with the
debug toolbar to make sure the right stuff is getting sent to google (esp.
when setting up custom events or setting up multiple trackers on the same
page).  You should be able to use it to verify that the same session and
cookies are being used as you go from page to page.  In the chrome debug
nowadays you can right click on the console log and select "Preserve Log
upon navigation" which makes this a lot easier.