Mobile app version of vmapp.org
Login or Join
Mendez628

: Tracking referrals between profiles on the same domain in Google Analytics I have a website at mydomain.com that uses Analytics. I have a blog that resides at mydomain.com/blog/, which also uses

@Mendez628

Posted in: #GoogleAnalytics

I have a website at mydomain.com that uses Analytics.

I have a blog that resides at mydomain.com/blog/, which also uses Analytics

They are on different profiles. The main site uses something like:

_gaq.push(['_setAccount', 'UA-XXXXXXXX-6']);

While the blog uses:

_gaq.push(['_setAccount', 'UA-XXXXXXXX-7']);
_gaq.push(['_setCookiePath', '/blog/']);


My issues is that this seems not to track referrals from the blog through to the main site when, for instance, the logo which links to the main site is clicked.

Ideally, I would like the clicks of this logo to report that the source was mydomain.com/blog/, but because they are at the same domain they seem to register as direct traffic.

Have I missed a step in my configuration, or will I have to resort to linking to something like mydomain.com?ref=blog?

Thank you.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Mendez628

3 Comments

Sorted by latest first Latest Oldest Best

 

@Smith883

My understanding was that _setDomainName('none') was used to seperate subdomains not subdirectories. Did this work for anybody?

I've tried the original scenario mentioned above by doctororange and got the same results - traffic from blog showing as direct traffic.

I also tried using profiles on the same domain and applied filters. In this case traffic showed from it's origninal source before the blog.

Is there any way to seperate a subdirectory so it's treated like a differnt domain I guess is my question!

I'm beginning to think it may be better just to use one profile and perhaps advanced segments.

10% popularity Vote Up Vote Down


 

@Carla537

I would advise you use the same tracking code for mydomain.com and for it's subdirectores like /blog/ and set up profiles for the site in you GA account for this.
With a filter like "include only traffic to subdirectories that contain /blog/".

Use different tracking codes for different domains or subdomains, and not for subdirectories.

10% popularity Vote Up Vote Down


 

@Jessie594

Have you tried using the function "_setDomainName('none')". That way both URLs are treated as different, else you need to:

_gaq.push(['_setAccount','UA-XXXXXXXX-6']);
_gaq.push(['_setAllowLinker',true]);
_gaq.push(['_setDomainName','mydomain.com']);


and set the backlinks to:

<a href="http://mydomain.com/blog/" onclick="_gaq.push(['_link','mydomain.com/blog/']);return false;">Link to blog</a>


as well as set:

_gaq.push(['_setAccount','UA-XXXXXXXX-7']);
_gaq.push(['_setDomainName','none']);
_gaq.push(['_setAllowLinker',true]);


and set links back via:

<a href="http://mydomain.com/" onclick="_gaq.push(['_link','mydomain.com']);return false;">Back to site</a>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme