Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

www.example.com
www.example.com/blog

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
add comment

1 Answer

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/']);
_gaq.push(['_trackPageview']); 

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
add comment

Your Answer

 
discard

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.