How to detect whether cross domain tracking is working properply?
So i wanted to track conversion in Google Ads. The challenge was that the traffic was sent to domainA whilst the potential conversion happens on domain.
What I did :
– Put on both domains the same Google Analytics code
– Added trusted domains in the Analytics code
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-29307859-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
//gtag('config', 'UA-29307123-1');
gtag('config', 'UA-29307123-1', {
'linker': {
'domains': ['www.domainB.be', 'domainB.be','domainA.com', 'www.domainA.com']
}
});
</script>
Couple of checks:
CHECK 1: If you moving from one domain to another domain one should see something pasted to the target url:
E.g. _ga=2.262824463.2041018120.1646037965-237878360.1646037965
CHECK 2: When visiting urls (no matter if this is on the origin domain or the targetted domain), there is a ‘signal’ sent out to Google with an ID, this ID should be the same. Look at it as if this is a way to identify the same person. When not configuring for cross domain tracking, those ID are by default different.
So how to check?
Open the Developer Console, when visiting a page, go to the Network tab and search for “cid=”
triggered script on the url of source domain (domainA)
https://www.google-analytics.com/collect?v=1&_v=j96&a=1681985826&t=pageview&_s=1&dl=https%3A%2F%2Ftaallessen.com%2F&ul=en&de=UTF-8&dt=Taallessen%20%7C%20domainA.com&sd=24-bit&sr=1920×1080&vp=673×937&je=0&_u=QCCACUABB~&jid=&gjid=&cid=237878360.1646037965&tid=UA-29307123-1&_gid=2041018120.1646037965>m=2ou2n0&z=2112349406
triggered script on url of the target domain (domainB)
https://www.google-analytics.com/j/collect?v=1&_v=j96&a=1670369166&t=pageview&_s=1&dl=https%3A%2F%2Fwww.domainB.be%2Faanbod%3F_ga%3D2.262824463.2041018120.1646037965-237878360.1646037965&dr=https%3A%2F%2FdomainA.com%2F&ul=en&de=UTF-8&dt=Ons%20Aanbod%20%7C%20Het%20domainB&sd=24-bit&sr=1920×1080&vp=673×937&je=0&_u=ACCACEABhAAAAC~&jid=&gjid=&cid=237878360.1646037965&tid=UA-29307123-1&_gid=2041018120.1646037965&_slc=1&z=1894522280
see also https://www.analyticsmania.com/post/subdomain-tracking-with-google-analytics-and-google-tag-manager/
Recent Comments