Cross-Domain ROI Tracking

As the ROI code that identifies the recipient and their emails is stored in the browser LocalStorage, it affects the ability to track across multiple domains.

If your site uses multiple domains, then you may need to implement cross-domain tracking on top of the standard setup.

👍

Not needed for intermediate payment pages

Cross-domain tracking is not normally needed if the only other domain in your checkout process is a payment provider. If your completion page (and therefore the call to mark the transaction complete) is on your own site, then it does not matter that the intervening payment pages are off-site.

Cross-domain tracking can be handled automatically, but there are also a number of methods available for you to manually implement a solution.

Automatic

When enabled, the ROI script will automatically add the required query string parameters to URLs linking to a configured autoLink domain, and also to any forms whose action is on a configured autoLink domain.

First, make sure that the standard setup has been implemented for all required domains.

Once this is done, set your domains and enable autoLink in the config for the ROI Tracking script using the setAutoLinkDomains and setAutoLink methods:

<script type="text/javascript">
    // ROI config options go here
  
    // Enable cross-domain tracking
    Mxm.Tracker.setAutoLinkDomains([
        'www.mydomain.com',
        'secure.mydomain.com',
        'www.mydomain.co.uk'
    ]);
    Mxm.Tracker.setAutoLink(true);
</script>

Manual (Advanced)

If you do not want to use the automatic addition of the ROI query string parameters to all links to a given domain, it's possible to formulate your own solution with the aid of some additional methods.

After completing a standard setup on all required domains, define the link domains using setAutoLinkDomains.

You can then pass individual links and forms using addLink and addForm for the script to monitor.

Alternatively, you can add the necessary ROI query string parameters to your own URLs. The query string key and value are available from getQueryKey and getRoiCode respectively.