- Help Center
- Configuration
- Cross-Domain Tracking
-
Getting Started
-
Configuration
- Targeting
- Split URL
- Product Testing
- Full Stack
- Experiment Management
- CSP Configuration
- Experiment Execution
- Reports
- Exit Popups
- GTM Integration
- Troubleshooting
- Performance Optimization
- Event-Triggered Changes
- Holdout Groups
- Split URL Pages
- URL Parameters
- DataLayer
- Menu Configurations
- Traffic Exclusion
- Experiment Scheduling
- Dynamic Element Changes
- Price Targeting
- Experience Scheduling
- Privacy
- Hash Changes
- Async Tracking
- Selective Installation
- CSS Selectors
- Vue.js Integration
- Page Content
- Multipage Split URL
- Organic Traffic
- Visual Editor
- Server-Side Testing
- Traffic Bucketing
- GDPR Warnings
- Statistical Confidence
- Browser Privacy
- Query Parameters
- Embedded Videos
- Tracking Code Execution
- Simultaneous Experiments
- Tags
- Deployments
- Disable Testing
- Locations
- Programmatic Bucketting
- Query Parameter Handling
- Convert Library
- Variation Previews
- Experiment Editing
- Opt-Out Script
- Data Reset
- Body Hiding
- Visit-Specific Variations
- Variation Styling
- Preview Issues
- Variation Editing
- Full-Site Testing
- Blinking Variations
- Cross-Domain Cookies
- Regex Support
- Conversion Tracking
- SPA Testing
- Project Setup
- Cross-Domain Tracking
- Geo-Targeting
- Analytics Tools
- Campaign Tags
- Previewing
- IDs
- Query String Targeting
- Bounce Rate Goals
- Bot Filtering
- Query String Variables
- Custom Audiences
- Redirects
- Baseline
- Tracking Code Location
- Secure Cookies
- AngularJS
- Cloudflare
- Code Installation
-
Track Goals
- Form Tracking
- Cookie Management
- iFrame Click Tracking
- Performance Optimization
- Revenue Tracking
- Interaction Goals
- Form Submissions
- Advanced Goals
- Lazy Loading
- Multi-Conversions
- URL Parameters
- Bounce Rate Goals
- DataLayer Integration
- Scroll Depth
- Social Interactions
- Page Views
- Marketo Forms
- Feature Analysis
- AJAX Forms
- Revenue Tracking via GTM
- Order Outliers
- Cumulative Revenue
- Goal Templates
- Adding Revenue Goals
- JS-Based Goals
- Goal Basics
- Google Analytics Goals
- Social Sharing
- Dynamic Goals
- Typeform Integration
-
Target Visitors
- Geolocation
- Interaction Goals
- Goal-Based Targeting
- Weather Targeting
- Cookie-Based Targeting
- Page Visits
- Audience Management
- Audience Segmentation
- Experiment Targeting
- Advanced Audience Creation
- Audience Templates
- Audience Creation
- Data Layer Integration
- Manual Activation
- JavaScript Conditions
- Device Targeting
- Language Targeting
- IP-Based Exclusion
- Visitor Management
- Page Tagging
- Cookies
-
Troubleshooting
- Google Warnings
- Visual Editor
- HTTPS Content
- Logs
- Support Options
- Bootstrap
- Cookie Blocking
- Change History
- Mobile Debugging
- AdWords
- Bot Exclusion
- Domain Issues
- Cloudflare Issues
- Monitoring
- Cloaking Penalties
- Goal Editor Issues
- Variations
- Snippet Performance
- Changes Not Saved
- Blocked Visual Editor
- Goal Testing
- Visual Editor Browsing
- Experiment Issues
- Installation Verification
- Data Leak Prevention
- Usage Limits
- Experiment Previews
- GA4 Revenue
- Chrome Debugger Logs
- SPA Errors
- Checkout JSON Error
-
Analyze Results
-
Integrations
- Google Analytics
- Cookie Consent Platforms
- Microsoft Clarity
- Plausible
- Marketo
- HubSpot
- Tealium
- Smartlook
- Klaviyo
- Salesforce CRM
- FullStory
- Snowplow Analytics
- Webflow
- GA4 Roles
- Amplitude
- Segment
- React
- BigCommerce
- WooCommerce
- Active Campaign
- Google Tag Manager
- Mixpanel
- Zapier
- Inspectlet
- Crazy Egg
- LanderApp
- Unbounce
- Instapage
- Drupal
- PrestaShop
- Magento
- Roistat
- Piano Analytics
- Heap Analytics
- Kissmetrics
- Mouseflow
- Adobe Analytics
- Clicky
-
Account Management
-
Developers
-
What's New
-
Common Questions
-
Shopify
Forwarding Tracking Cookies Between Different Domains
THIS ARTICLE WILL HELP YOU:
- Understand Tracking Cookies and Different Domains or Devices
- When the form cannot be modified but you can add hidden fields
- When the form cannot be modified but you cannot add hidden fields.
Understand Tracking Cookies and Different Domains or Devices
When there are multiple domains or devices where a test needs to run or where the conversions need to be tracked, things get a little bit complicated. A common scenario would be when you have pages spread across two domains. You have the main site that hosts all the products but the actual checkout happens on another domain.
In this situation, without forwarding the convert cookie data to the checkout domain, the conversions will not be tracked.
Cookies that are stored and accessed under a specific domain cannot be accessed from a page hosted on another domain. Therefore, the cookie data has to be passed along when leaving one domain and going to the other one. Convert Experiment does this by default when it finds page links for the domains listed on the Active Domains in the Project Settings and form submissions between the domains inside the same projects. This is done on document ready by modifying the submit and click handlers for forms and links respectively. Sometimes, due to dynamic content being added via JavaScript, this process does not work and the site owner needs to pass the convert cookies inside their scripts.
There are two cookies in which data has to be passed as GET or POST parameters to the page in the other domain.
- _conv_v - is the visitor level cookie that holds data that describes visitor's activity
- _conv_s - session level cookie;
Their data needs to be passed in the URL as GET parameters, under the same names. To get their value, we make the following available:
convert.getCookie(name);
If the outgoing URL is http://www.mysite.com/,page.html then the final destination URL, put together with JavaScript code, would be something like this:
"http://www.mysite.com/page.html?_conv_v="+encodeURIComponent(convert.getCookie("_conv_v"))+"&_conv_s="+encodeURIComponent(convert.getCookie("_conv_s"))
Of course, the destination page needs to have converted the experiment's code installed correctly for this to work.
When the form cannot be modified but you can add hidden fields
There are occasions when the jump from one domain to another is done via a form submission. To transfer the cookie data, it can be passed via hidden form inputs. This is usually done automatically. However, when this does not happen automatically you can modify the form to add this information to hidden input fields. The code can be added via the Experiment Global Javascript, the Project Global Javascript, or through a Custom Javascript of a Deploy experience targetted to the form page.
The code that you add can be the following:
convert.$( document ).ready(function() {
convert.$("<input>").attr({ name: "_conv_v", type: "hidden", value: (convert.getCookie('_conv_v'))}).appendTo("form.header-booking-form");
convert.$("<input>").attr({ name: "_conv_s", type: "hidden", value: (convert.getCookie('_conv_s'))}).appendTo("form.header-booking-form");
});
When the form cannot be modified but you cannot add hidden fields.
The only way to do this would be to transfer the cookie data via query parameters by calling a page on the second domain on an iframe when the page on the first domain loads. The only disadvantage with this approach is that a page visit to the page loaded in the iframe will be displayed every time they land on the form. Also, the first-page hit will load both pages' resources.
The following code can be added via the Experiment Global Javascript, the Project Global Javascript, or a Custom Javascript of a Deploy experience targetted to the form page.
convert.$( document ).ready(function() {
convert.$('<iframe src="https://seconddomain.com/page1.html?' + '_conv_v=' + escape(convert.getCookie('_conv_v')) + '&_conv_s='+ escape(convert.getCookie('_conv_s')) + '" frameborder="0" scrolling="no" id="myFrame" style="display:none;"></iframe>').appendTo('body');
});