Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
For public machines, it depends which library you are sitting in, for staff machines they default to a staff gateway that many change to the library home page. ___ Michael Friscia Manager, Digital Library Programming Services Yale University Library (203) 432-1856 -Original Message- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Ross Singer Sent: Tuesday, February 07, 2012 9:32 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains On Feb 7, 2012, at 3:23 PM, Predmore, Andrew andrew.predm...@yale.edu wrote: We have actually already discussed that case. Right now, it is exactly as you described. But, those cases cannot explain how 50,000 people can hit the home page in one day and 48,850 are dropping off. Do your public machines have the library's web page as their homepage? Do your staff machines? -Ross. People might be interested in the solution we came up with for the home page drop-off problem in a huge place like this: At first, we had talked about filtering by IP range. But, that would be a maintenance nightmare, and it wouldn't allow us to track computers that did not have the website as the homepage, like staff, mobile, etc. Then, we realized that we do have control over the machine images in the public areas. And, we could set up aliases for the library home page, like library.yale.edu/image1, library.yale.edu/area2. So, we could set the browser home pages to the aliases, and we could tell exactly which request were coming in from our public computers, and wether they really were dropping of or not. -- Clayton Andrew Predmore Manager, Web Operations Yale University Library andrew.predm...@yale.edu On 2/7/12 10:52 AM, Andy Kohler akoh...@ucla.edu wrote: If your library's machines all have www.library.yale,edu as their home page are you assuming that users actually click links to leave that home page? User sits at library machine, user sees library home page, user types url for gmail or youtube or facebook,,, does GA track those actions? On Mon, Feb 6, 2012 at 12:55 PM, Predmore, Andrew andrew.predm...@yale.edu wrote: 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/jnkmfdileelhofjcijamephohjechh na 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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
If your library's machines all have www.library.yale,edu as their home page are you assuming that users actually click links to leave that home page? User sits at library machine, user sees library home page, user types url for gmail or youtube or facebook,,, does GA track those actions? On Mon, Feb 6, 2012 at 12:55 PM, Predmore, Andrew andrew.predm...@yale.edu wrote: 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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
We have actually already discussed that case. Right now, it is exactly as you described. But, those cases cannot explain how 50,000 people can hit the home page in one day and 48,850 are dropping off. People might be interested in the solution we came up with for the home page drop-off problem in a huge place like this: At first, we had talked about filtering by IP range. But, that would be a maintenance nightmare, and it wouldn't allow us to track computers that did not have the website as the homepage, like staff, mobile, etc. Then, we realized that we do have control over the machine images in the public areas. And, we could set up aliases for the library home page, like library.yale.edu/image1, library.yale.edu/area2. So, we could set the browser home pages to the aliases, and we could tell exactly which request were coming in from our public computers, and wether they really were dropping of or not. -- Clayton Andrew Predmore Manager, Web Operations Yale University Library andrew.predm...@yale.edu On 2/7/12 10:52 AM, Andy Kohler akoh...@ucla.edu wrote: If your library's machines all have www.library.yale,edu as their home page are you assuming that users actually click links to leave that home page? User sits at library machine, user sees library home page, user types url for gmail or youtube or facebook,,, does GA track those actions? On Mon, Feb 6, 2012 at 12:55 PM, Predmore, Andrew andrew.predm...@yale.edu wrote: 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/jnkmfdileelhofjcijamephohjechh na 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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
Yes, the code is not consistent across our pages. That is the problem I am trying to solve. The pages are served by dozens of different systems. Therefore, I had held off on changing all of them until I knew I had working code. At this point, based on my research and the feedback here I will be going with this: _gaq.push(['_setDomainName', '.yale.edu']); After I get that code on the majority of pages, I can start looking into the separate problems I am having with drop-offs and setting up a profile that will show me the sub-domains. Thank you to everyone for the help. -- Clayton Andrew Predmore Manager, Web Operations Yale University Library andrew.predm...@yale.edu On 2/6/12 4:53 PM, Brian Tingle brian.tingle.cdlib@gmail.com wrote: 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.htmlht tp://%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.
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
Having a quick look at your site(s), it appears that those links through resources... are redirecting through other pages. If so, it may have more to do with not being able to follow the flow of page accesses, than the ability to track a sub domain. G On Feb 7, 2012 12:30 PM, Predmore, Andrew andrew.predm...@yale.edu wrote: Yes, the code is not consistent across our pages. That is the problem I am trying to solve. The pages are served by dozens of different systems. Therefore, I had held off on changing all of them until I knew I had working code. At this point, based on my research and the feedback here I will be going with this: _gaq.push(['_setDomainName', '.yale.edu']); After I get that code on the majority of pages, I can start looking into the separate problems I am having with drop-offs and setting up a profile that will show me the sub-domains. Thank you to everyone for the help. -- Clayton Andrew Predmore Manager, Web Operations Yale University Library andrew.predm...@yale.edu On 2/6/12 4:53 PM, Brian Tingle brian.tingle.cdlib@gmail.com wrote: 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 ht tp://%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.
[CODE4LIB] Google Analytics w/ Sub-sub-domains
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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
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#domainSubDomains 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.edumailto:andrew.predm...@yale.edu
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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
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.edumailto:andrew.predm...@yale.edu
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
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.htmlhttp://%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.
Re: [CODE4LIB] Google Analytics w/ Sub-sub-domains
Andrew, I looked at the www.library.yale.edu and a bit confused with the links there. The links go to resources.library.yale.edu, but users will eventually get the www.library.yale.edu/researchtools or other sub-directories. So, my question is why there even exists resources.library.yale.edu if the users would end up in a subdirectory of www.library.yale.edu? The only thing that I can think of is to track the click-through by looking at the logs. If that's the case, why the need to have GA code to track resources.library.yale.edu? Sorry, not really helping out, but perhaps understanding the reason behind that resources.library.yale.edu might help figure out how to proceed. Either way, looks like the Brian Tingle's suggestion should work. Also, since most of the link from www.library.yale.edu go to a different subdomain, I believe the 98% drop off is expected. ranti. On Mon, Feb 6, 2012 at 2:53 PM, Predmore, Andrew andrew.predm...@yale.edu 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.edumailto:andrew.predm...@yale.edu -- Bulk mail. Postage paid.