Google Analytics · Tag Manager
A shop and a third-party cart
The classic cross-domain example: the shop runs at www.example-petstore.com, the checkout at a shopping cart provider on another domain. Without cross-domain measurement, a visitor who moves from the shop to the cart is counted as a new visitor, and the sale is no longer linked to how they found the shop. Older snippets linked the two domains in code:
_gaq.push(['_setAllowLinker', true]);
<a href="https://www.example-commerce-host.com/petStoreCart/"
onclick="_gaq.push(['_link', this.href]); return false;">Checkout</a>
These lines belong to Classic Analytics (ga.js), which no longer collects data, just like Universal
Analytics. In Google Analytics 4, both domains go into the admin instead: Admin, Data streams, your web stream,
Configure tag settings, Configure your domains. Enter your own shop and the domain of your own cart provider.