If you wish to use Google Analytics with embedded interactive content, you might want to enable cross-domain tracking. This feature allows Google Analytics to recognize embedded interactive content traffic as belonging to your host website.
Find guidance below on how to setup your Google Tag Manager Settings, or the Google Analytics Addon, so that cross-domain tracking is enabled.
Find also how to enable cross-domain tracking when embedding using our Dot Embed WordPress Plugin, or using our Javascript Embed solution.
REMINDER: remember to also enable Google Analytics or Google Tag Manager on your project.
When Using Google Tag Manager Addon
To enable cross-domain tracking when using Google Tag Manager Addon you must first setup a Variable:
- Give it a recognizable name, such as ga_crossdomain
- Select Variable Type: Google Analytics Settings
- Provide your Google Analytics property ID as tracking ID (e.g. UA-XXXXXX…)
- Expand More Settings dropdown
- Expand Fields to Set dropdown
- Add a field and set Field Name to “allowLinker” and Value to “true” (both without quotes)
- Expand Cross Domain Tracking dropdown
- Add one or more host domains (comma separated) in the Auto Link Domains field. So if you are embedding interactive content in mycompany.com, simply type mycompany.com on that field.
Once you have created your Google Analytics Settings variable, you can now use it whenever creating Google Analytics tags.
When Using Google Analytics Addon
To enable cross-domain tracking when using Google Analytics Addon:
- In the Editor, go to your Google Analytics Addon setting
- Add the host domain or domains (comma separated) where you will embed the experience.
- Save and close
With Dot Embed WordPress Plugin
- While editing the project you wish to embed, click Put On Website
- Go to the WordPress Plugin tab
- Check the Allow Google Analytics cross-domain tracking checkbox
- Copy and use the new shortcode provided
- Make sure you have followed the steps for When Using Google Tag Manager, or for When Using Google Analytics Snippet Code
With Javascript Embed Solution
- While editing the project you wish to embed, click Put On Website
- Go to the Javascript tab
- Check the Allow Google Analytics cross-domain tracking checkbox
- Copy the two code snippets given and paste them on your website wherever you wish to load interactive content. The first snippet must only be included once per page. The second snippet may be included multiple times for different pages.
- Make sure you have followed the steps for When Using Google Tag Manager, or for When Using Google Analytics Snippet Code
Referral Exclusion On Google Analytics
In order for your traffic to not appear as referral traffic, and to not have the session count doubled, you should add the dot.vu domain to your Referral Exclusions list, as explained in this article from Google’s Support:
https://support.google.com/analytics/answer/2795830?hl=en
Do you experience a delay when embedding your content?
IMPORTANT: When you enable cross domain tracking, you may experience a delayed loading of up to 8 seconds, which can be caused by:
- Google Analytics not being enabled on the webpage.
- Active adblockers on the browser when visiting the page.
- Cookies Policy not being accepted (depends on local website configurations).