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?

1 Answer 1


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

  • 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, 2012 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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