Google Analytics gtag.js Iframe Cross-domain Clientid issue

Viewed 902

Our goal here is to keep Google Analytics conversion goal tracking data when we load an iframe from another domain name that we own.

We have a domain rentalbookingsoftware.com that on the free trial page: https://rentalbookingsoftware.com/free-trial-signup/ loads an iframe for our free trial installer from sidev2.info like this:

<iframe width="80%" height="500" src="https://sidev2.info/freetrialform.php"></iframe>

We are trying to keep the gtag.js clientid the same but a new session is started on the sidev2.info gtag tracking which causes the correct referrer information to be lost as you can see from the gtag recording: https://www.screencast.com/t/l5wsqUF6oAg . Both sites are using this tracking code as suggested from: https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain and I have added sidev2.info to the referrer exclusion list: https://support.google.com/analytics/answer/2795830

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45446232-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-45446232-1', {
  'linker': {
    'domains': ['rentalbookingsoftware.com', 'sidev2.info']
    }
  });
</script>

How can we keep the clientid using gtags? I found this: https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain but it is for analytics.js tracking, should we switch to that tracking method?

0 Answers
Related