Reputation: 1892
Upgrading my site from ga.js legacy to analytics.js. I have a piece of code from classic ga.js that I need to upgrade to universal analytics.
How do I upgrade this code onsubmit="ga(['_linkByPost', this]); return true;"
to universal analytics code? I use this code on a form for cross domain linking. Now I just have to figure out how to convert this to universal analytics.
Upvotes: 0
Views: 239
Reputation: 927
I think that you need to use linker.
ga('linker:autoLink', ['example-2.com'] );
See if this is what you're looking for:
https://support.google.com/analytics/answer/1034342?hl=en
https://developers.google.com/analytics/devguides/collection/analyticsjs/linker?hl=en
Upvotes: 1