homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Google Analytics Cross Domain
Use GA code across multiple domains including a checkout
rwilson




msg:4323611
 7:43 pm on Jun 8, 2011 (gmt 0)

I want to use GA across several domains including a yahoo merchant checkout. I have a "corporate" site, a "store" site and a secure checkout domain that currently have separate GA profiles.

I think in order to have cross-domain analytics you need a different tracking code. Has anyone done this or similar? What happens to my existing profiles? is there a way to make one of these existing accounts the new "main" account?

Any help would be appreciated!

 

still




msg:4331830
 11:17 pm on Jun 27, 2011 (gmt 0)

Way I set it up in the past is to have a separate profile for rollup reporting to track round trips, as well as domain specific one.

For example:
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(
['main._setAccount', 'UA-30264xx-1'],
['main._setDomainName', 'none'],
['main._trackPageview'],
['rollup._setAccount', 'UA-30264xx-2'],
['rollup._setDomainName', 'none'],
['rollup._setAllowLinker', true],
['rollup._trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>


Then depending on how many outbound links you have to your other domains you either tag each manually or put together a script to automate it for you.

Onclick for outbound link (I also include an event to see outbound links in main profile) :
_gaq.push(['main._trackEvent', 'External Link', 'Asset' , 'http://otherdomain.com']);_gaq.push(['rollup._link', 'http://otherdomain.com']); return false;

Lastly, in your rollup profile, create a filter to append the hostname to your URI so you can tell them apart.

Hope that helps.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved