Google Analytics Cross Domain Tracking and _setDomainName()

后端 未结 4 746
予麋鹿
予麋鹿 2020-12-24 13:27

I\'m trying to set up cross domain tracking between two totally different Domains (not sub-domains). Looking through different pages of Google\'s documentation seem to give

4条回答
  •  悲哀的现实
    2020-12-24 14:00

    If it is cross domain

    tracking,_gaq.push(['_setDomainName', 'mysite.com']);
    

    or

    _gaq.push(['_setDomainName', '.mysite.com']);
    

    does not make any difference, as cookie information is not shared across these two different domains any way.

    I've set up tracking between domain 1 and domain 2, one way tracking. Initially as suggested in Google Analytics I've added _gaq.push(['_setDomainName', 'none']); on both of the domains. It was for new Google Analytics A/B testing, verification for A/B testing resulted in error. So, I removed _gaq.push(['_setDomainName', 'none']); from domain 1 and left it on domain 2 as it is and it worked perfectly fine.

    I've documented it here.

提交回复
热议问题