Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two sites, both on the same domain name. I.E.


I have an analytics account set up for both which works well; I can see that traffic for the sites in their respective accounts. However, I want to be able to track referrals from www.example.com/blog towww.example.com. Although I know referrals are occurring, I can't seem to find any way to track them in analytics. I think something needs to change with my analytics code, but I am not sure what to do. Do I need to do something with the cookie domain?

share|improve this question

Looks like you need to specify the cookie path. Try:

//Tracking Code Customizations Only
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'YOUR-ACCOUNT-ID']);
_gaq.push(['_setCookiePath', '/blog/']);

See Tracking a Single Subdirectory

share|improve this answer
I changed my analytics code to what you suggested, but I still don't see referrals listed in the www.example.com analytics account. This seems to have fixed half the problem, I can see referrals from www.examle.com -> www.example.com/blog but I still don't see referrals from www.example.com/blog -> www.example.com. Is it possible to get those listed as well? Thanks for your response. – Daniel Jan 11 '12 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.