CardinalPath/gas — Issue #7: Doc questions
Author: KarinaLibrary
Created: 2012-02-07 17:01:04+00:00
State: open

Hey Eduardo -

Wondering how I would "translate" this GATC into GAS (with cross domain tracking for domain1, domain2 on the UA-yyyyyyyy-y account) :

_gaq.push(['o._setAccount', 'UA-xxxxxxxx-x']); // old legacy id retained for data reasons
_gaq.push(['o._trackPageview']);
_gaq.push(['xd._setAccount', 'UA-yyyyyyyy-y']); // id for cross domain tracking
_gaq.push(['xd._setDomainName', 'domain1.com']);
_gaq.push(['xd._addIgnoredRef', 'domain1.com']);
_gaq.push(['xd._setAllowAnchor', true]); // needed on the cross domain tracking only
_gaq.push(['xd._setAllowLinker', true]);
_gaq.push(['xd._trackPageview']);

Would it look like:

_gas.push(['o._setAccount', 'UA-xxxxxxxx-x']);
_gas.push(['o._trackPageview']);
_gas.push(['xd._setAccount', 'UA-yyyyyyyy-y']);
_gas.push(['xd._setAllowAnchor', true]);
_gas.push(['xd._setAllowLinker', true]);
_gas.push(['xd._setDomainName', 'domain1.com']);
_gas.push(['xd._setDomainName', 'domain2.com']);
_gas.push(['xd._setMultiDomain', 'click']);
_gas.push(['xd._trackPageview']);

How to handle addIgnoredRef, since setDomainName is being used to add domains into the cross-domain tracking? Maybe not that important. Is claimed to reduce self-referrals, but may not be needed.