In this article, you’ll learn the following: |
Overview
When running experiments across multiple domains, ensuring consistent tracking of visitor behavior is critical to accurate results. VWO provides a powerful solution for this with its cross-domain tracking feature, enabling seamless tracking of visitor interactions across different websites. This feature ensures that even when visitors navigate between domains, their actions are accurately captured and attributed within your campaigns.
What is Cross-domain Tracking?
Imagine you have two websites: example.com and myexample.com. You run a test where visitors see different versions of a page on example.com, and then some are redirected to myexample.com to complete a goal (like a purchase). Without cross-domain tracking, VWO wouldn't connect these actions as belonging to the same visitor. It would appear as two separate visits.
When Do You Need Cross-domain Tracking?
You’ll need this feature in two main cases:
- Goal/Metric URL on a Different Domain: You run a test on example.com, but conversions (like purchases) happen on myexample.com.
- Campaign URLs on Different Domains: You test different versions of pages on multiple domains, like example.com and myexample.com.
How to Enable Cross-domain Tracking?
When setting up a test campaign:
- Navigate to Configuration > More configurations > Additional options > Campaign.
- Look for the Track visitors across multiple domains option and enable it.
Handling Browser Restrictions on Third-party Cookies
While cross-domain tracking is effective, certain browser restrictions on third-party cookies can impact the consistency of VWO's tracking ability across different domains.
Imagine this: You have two websites, a.com and b.com, using VWO for testing. A visitor with a browser that blocks third-party cookies visits a.com and then gets redirected to b.com. Here's the problem:
- VWO relies on cookies to track visitors across domains.
- The blocked third-party cookies prevent VWO on b.com from recognizing the visitor who just came from a.com.
- As a result, VWO counts the visitors on b.com as entirely new, even though they already interacted with a.com.
The outcome? Your VWO reports will show double the number of visitors, leading to inaccurate data and making it harder to analyze your campaign performance correctly.
To avoid this issue and maintain consistent tracking across domains, you can follow the procedure below (one-time setup):
Procedure:
-
Implement the following JavaScript API code on your website (the domain visitors will be redirected). This code will fetch the cross-domain information, including the query string parameter key and value.
-
Append the query string parameter key and value to the URL where the visitors will be redirected. Here’s an example:
By enabling multi-domain tracking and implementing the cross-domain JavaScript API, you can ensure that visitor data is tracked consistently across domains, even in cases where third-party cookies are blocked. This setup helps maintain the accuracy of your visitor count and conversion data across campaigns spanning multiple domains.
NOTE: This is only applicable for Data360 accounts on the Pro or Enterprise plan.Things to Consider
- VWO SmartCode should be implemented on all the domains that are to be involved in the tracking.
- You need not enable cross-domain tracking for subdomains in your account.
- Do not enable cross-domain tracking if you have defined a ‘click on a link’ goal/metric and the link points to a different domain or if you have a ‘track form submits’ goal/metric and the action URL is of a different domain.
- Cross-domain tracking must be enabled when the control and variation URLs in a Split URL campaign are of different domains.
- Cross-domain tracking is not supported for VWO Insights.
-
If you are self-hosting the JavaScript files, you are not allowed to enable cross-domain tracking.
-
For enhanced privacy, Chrome, Safari, and Firefox browsers block cross-domain tracking by default. As a result, VWO cannot access third-party cookies, thereby prohibiting cross-domain tracking from working in these browsers. However, the default settings can be disabled using the following:
- In the Chrome browser, go to Settings > Privacy and security > Third-party cookies and select Allow third-party cookies.
- In the Safari browser, go to Settings > Privacy and disable the Prevent cross-site tracking setting.
- In the Firefox browser, go to Preferences > Privacy & Security > Custom and disable the following settings- Cookies and Tracking Content.
- With the iOS 14 and macOS 11 upgrades, Apple introduced the Privacy Report feature in Safari. You can use this to examine a website's report to see which websites are tracking you and display the trackers that Safari has blocked. The report shows both cross-site tracking trackers and those detected by Apple's intelligent tracking prevention.
NOTE: In VWO's context, this does not impact VWO tracking, as VWO works with first-party cookies. VWO tracking would be affected only when you use the cross-domain tracking feature of VWO, as some browsers do not allow working with third-party cookies by default. - VWO SmartCode should be implemented on all the domains that are to be involved in the tracking.