Domanda

Implementing google analytics cross-domain tracking between a site and its shopping cart on another domain. On the WordPress site, have kept the original profile id to maintain continuity in reporting for the sole domain:

WordPress site

 var _gaq = _gaq || [];
  _gaq.push(['o._setAccount', 'UA-xxxxxxxx-4']);
  _gaq.push(['o._trackPageview']);
  _gaq.push(['xd._setAccount', 'UA-yyyyyyy-1']);
  // other cross-domain parameters are set here... 
  _gaq.push(['xd._trackPageview']);

On the shopping cart site, do I need to use the same named tracker to keep the cookies straight? I.e., do I need on the second site to have

shopping cart domain

_gaq.push(['xd._setAccount', 'UA-yyyyyyy-1']);
_gaq.push(['xd._trackPageview']);

Or could it remain the default:

  _gaq.push(['_setAccount', 'UA-yyyyyyy-1']);
  _gaq.push(['_trackPageview']);

What is the effect in each case?

È stato utile?

Soluzione

You don't need to, but if you do it will work either way.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top