Set up Floodlight tags, activities, and groups

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 global site 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 global site 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 global site 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 simplify 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 global site 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.
-->
<!-- Global site 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 global site 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 global site 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 global site 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?