Tagging cross-domain forms Google Analytics

Gold Contributor
Gold Contributor

Hello

 

We wanted to tracking cross domain, we have a website, the login form is in X.com domain and the next pages are in Y.com domain. The login form works with an input button that submits the form.

 

Is there any method to track cross domain like Google Tag Manager does?

 

Thanks in advance

6 REPLIES 6

Tagging cross-domain forms Google Analytics

Tealium Employee

Hi @ofernandezg

 

I believe you would be after this post:

 

https://community.tealiumiq.com/t5/Tags-and-Client-side/Setting-Up-Google-Universal-Analytics-Cross-...

 

It goes through step by step extacly what you wanted to know.

 

Regards,

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Tagging cross-domain forms Google Analytics

Gold Contributor
Gold Contributor

Hi @adrian_browning

Thanks for the post. I was aware of this solution but it only works with anchor (decorate links). I can't make it work with an input button that submits the form.

Regards,

Óscar

Tagging cross-domain forms Google Analytics

Tealium Employee

 

Hi Óscar ( @ofernandezg )

 

So looking at the information from Google on their devlopers.google.com site:

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/linker

 

I looks like you have two options

 

 1. You will need to call an updated linker option: - automatically_adding_linker_parameters

 

//Options
//false - not anchors
//true - forms

//Pure GA
ga('linker:autoLink', ['destination.com'], false, true);

//Tealium Variant
u.all('linker:autoLink', ['destination.com'], false, true);

 2. Create a click handler on the form with a call to the following: - manually_adding_linker_parameters

 

ga('[trackerName.]linker:decorate', element, [useAnchor]);

If you need any more specific help with implementing this, I would suggest raising a support ticket so one of our Support Engineers can help you directly.

 

https://community.tealiumiq.com/t5/custom/page/page-id/support-contact-form

 

Regards,

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Tagging cross-domain forms Google Analytics

Gold Contributor
Gold Contributor
Many thanks Adrian

We are going to see how the solution works!!

Tagging cross-domain forms Google Analytics

Gold Contributor
Gold Contributor

Hi @adrian_browning

Sorry for delay getting back to you.

I tried the two options, with an extension scoped to Tag Especific and DOM Ready and I can't make it work, but if I use on my page the GA code it's working

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXXXX-X', 'auto', {'allowLinker': true });
ga('require', 'linker');
ga('linker:autoLink', ['maindomain.com','targetdomain.com']);

Tagging cross-domain forms Google Analytics

Tealium Employee

@ofernandezg

 

That is very interesting, as the template does this support functionality.

 

Please can you raise a support case at https://community.tealiumiq.com/t5/custom/page/page-id/support-contact-form

 

And then we can then see why you are unable to do this. 

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public