Notification

Welcome to the help center for Search Ads 360, a platform for managing search marketing campaigns.  While the help center is available to the public, access to the Search Ads 360 product is available only to subscribing customers who are signed in. To subscribe or find out more, contact our sales team.

Use the Google tag

Cross-domain conversion tracking

To measure activity when your customer journeys span two or more related sites across multiple domains, add the domain linker to your Google tags

For example:

  1. An online retailer has country-specific stores but a single site for processing purchases.
  2. A customer visits example.store.co.uk, clicks the purchase button in the shopping cart, and is sent to the example.store.com domain to complete the transaction. 
  3. To link the conversion on example.store.com to the visit on example.store.co.uk, the retailer adds the domain linker to the Google tags on both sites.

The domain linker shares 1st party measurement cookies between your source domain and your destination domain. The 1st party measurement cookies are stored in a web browser, and can only be accessed by pages on the same domain.

How to use the domain linker

To use the domain linker, add  gtag('set', 'linker' {domains}) to your Google tags. Add the command to all pages in your source domain that can send visitors to your destination domain, and specify the destination domain in the command's domains property:
  gtag('set', 'linker', {
   'domains':
['destination-domain.com']
   });

To streamline tag maintenance, consider adding the command to all pages on your sites and listing all of your domains in the command's domains property. This enables you to use the same command on all of your pages and ensures that conversions can be properly measured regardless of the direction of links across your sites. 

Continuing the example of the online retailer, here's a Google tag with a set linker command that names both domains:

<!-- 
Start of global snippet: Please do not remove
Place this snippet between the <head> and </head> tags on every page of your site.
-->
<!-- Google tag (gtag.js) - DoubleClick -->
<script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script>
<script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments)};

 gtag('set', 'linker', {
   'domains':
['example.store.co.uk', 'example.store.com']
   });

 gtag('js', new Date());

 gtag('config', 'DC-1234567');
</script>
<!-- End of global snippet: Please do not remove -->

Note: To ensure that set values are available for config commands and available to any dynamically-loaded containers, add the set command above the js command in your Google tag.

What does the set linker command do?

The gtag('set', 'linker' {domains}) command adds a URL parameter named _gl to URLs on the page that point to a domain listed in the command. When the Google tag on the destination page sees this URL parameter, it extracts the 1st party measurement cookie and stores it, which shares the 1st party measurement cookie between your source domain and your conversion domain​.

Continuing the example of the online retailer:

  1. The gtag('set', 'linker' {domains}) command on the shopping cart page adds the _gl parameter to the URL that points to the conversion domain:
    https://example.store.com/purchase/?_gl=1~abcde5~
  2. When the link reaches https://example.store.com/purchase, the Google tag on that page extracts the 1st party measurement cookie and stores it.

Learn more about measuring customer journeys across domains.

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Main menu
6843722517477429244
true
Search Help Center
true
true
true
true
true
263
false
false