⚠️ Universal Analytics no longer processes data for standard GA accounts.
For GA360 accounts, data will stop processing on July 1, 2024.
Make sure you connect your publications to GA4 to avoid losing data.
Looking at how much traffic came from the publication domain is a great way to identify how well your online publications have performed. To allocate online purchases to the original source (e.g. paid advertising), you need the recorded session to be uninterrupted from the moment the site is first entered until the moment a purchase is made.
By setting up cross-domain tracking, Google Analytics will treat the online publications as part of your own environment, which will prevent the online publications from initiating a new session with a new campaign when it sends traffic back to your site.
In this article:
- You have connected Google Tag Manager to your publications
- You have configured publication tracking in Google Tag Manager
- You can change the settings of the target Google Analytics property (custom dimensions, view filters)
- You can make and publish changes in the Google Tag Manager Container
If your Google Tag Manager has not been connected to your online publications yet, you can use this article to configure publication tracking in Google Tag Manager.
It is important to consider that adding publication data to an existing property can significantly increase the number of events and page views recorded by the property's views. Make sure to update the filters of each view to either include or exclude the publication data.
- All domains are tracked by the same Google Analytics property
- view.publitas.com and applicable custom domains are added to the referral exclusion list
- The Google Analytics configuration for both website and publications have the following setting applied: AllowLinker=true
- The Google Analytics configuration for both website and publications include the list of Auto Link Domains
- In case publications are embedded, the iframe decorator script is added to website
- No UTM parameters are appended to the URLs, linked in the publications
Below, the instructions for each step are described in more detail.
1. All domains are tracked by the same Google Analytics property
Make sure that Google Analytics configurations in Google Tag Manager, for both your website as the online publications, are connected to the same tracking ID.
TIP: It can help to have both the website and the publications share the same GA settings. In this case, don't forget to copy over the custom dimensions and the cookieFlags setting from the imported GA Settings Variable before deleting the redundant variable.
2. view.publitas.com and applicable custom domains are added to the referral exclusion list
Add view.publitas.com and the custom domain (if applicable) to the referral exclusion list in Google Analytics. This will avoid new sessions from being recorded when traffic is transferred between domains.
3. The Google Analytics configuration for both website and publications have the following setting applied: AllowLinker=true
In the Fields to Set section, add a new field that says allowLinker = true. Ensure this setting is applied to the page view tracking for both the website and the publications.
4. The Google Analytics configuration for both website and publications includes the list of Auto Link Domains
In the Cross Domain Tracking section of the Google Analytics settings, submit all domains that require uninterrupted tracking. Subdomains are not automatically included. That is why we recommend adding all relevant subdomains individually.
Ensure this setting is applied to the page view tracking for both the website and the publications.
5. In case publications are embedded, the iframe decorator script is added to website
The allowLinker function ensures that the client ID is shared between domains whenever a link between two domains is clicked. For example, when a link on the website is clicked that will open an online publication. When a publication is embedded on a webpage, both the website and publication load simultaneously and the allowLinker function does not trigger.
In this case, we need to install a separate function in Google Tag Manager to pass along the client ID from the website to the embedded publication.
- Download the file attached to this article (see Downloads)
- Open the Container, responsible for cross-domain tracking in Google Tag Manager
- Go to the Admin section and select Import container
- Choose the downloaded file
- Select the correct workspace to apply the changes to
- Select Overwrite and click Confirm
- Locate the Google Analytics settings that is responsible for tracking pageviews of the website.
- In the Fields to Set section, add a new field that says customTask =
For example, when a publication is embedded like this:
<iframe style="display: block; box-sizing: border-box;" src="https://view.publitas.com/PUBLICATION-URL-GOES-HERE?publitas_embed=maximized" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
selector: '.publitas-container iframe',
6. No UTM parameters are appended to the URLs, linked in the publications
With cross-domain tracking active, the online publications are tracked at the same level as other website pages. This means, there is no longer a need for UTM parameters which are used by Google Analytics to help determine the source of external traffic.
Be sure to remove the UTM parameters from the product feed used in Publitas, from the hotspots added manually to the publications (e.g. Link hotspots), and disable the UTM automation feature in case you've used it in the past.
How to test if cross-domain tracking works
To test if cross-domain tracking is working, you can visit your website, navigate to the online publication, and use the hotspots to navigate back to the website while checking if the Google Analytics client ID is passed along with each step.
To know what Client ID is used, you must find the cookie that stores it. For this, you can use the Chrome browser. Press the F12 key, go to the Application tab, click on Cookies, select the applicable domain from the drop-down list, and find the cookie named _ga :
Be sure to look for the value of the _ga cookie, every time you navigate between domains to check if it has remained the same. If the publication is embedded, check both the website and publication domains in the dropdown list.
If you are unfamiliar with how Google Tag Manager works or how to navigate the settings of Google Analytics, our Services team can guide you through this. Contact your Success Manager for more information.