Article sections

    Browser security rules make tracking goals on cross domains a little tricky for every client-side application, and some custom integration is necessary.

    The only goal type that can be measured on cross domains is the ‘custom’ one.

    Necessary steps:

    Let’s say you have two different domains – and, and you want to set an experiment on which sends the visitors to, and you want to track how many of them convert on

    In order to do that, on the page, on which you want to track conversions ( for example, ), you must insert an iframe, in the body of the thank you page, that contains a link to a custom page (conversion.html) hosted on the original domain/website which in this case is

    The iframe script that must be inserted is the following:

    <iframe src="">

    The conversion.html page is a stand-alone HTML page, hosted on the that should contain the following code:

        <!-- start code -->
        <link rel="dns-prefetch" href="//">
    var _mktz = _mktz || [];
    //insert the goal code generated by Omniconvert and the transaction ID
        <script type="text/javascript" src="//"></script>         
    <!-- end code --> 

    If you need to save a goal value you can pass it via a GET parameter to this iframe. In this case, the URL should look like this:[value]

    Also, the iframe code has to be modified to handle the new parameter:

    var urlParams = new URLSearchParams(;
    var saleValue = urlParams.get(“sale”);​
    var _mktz = _mktz || [];
    //insert the goal code generated by Omniconvert

    Attention:  This code must be installed only on the page where you want to track the goal – Eg: the thank you page – NOT on the pages where the experiments are running. Installing it on the pages where experiments are active will stop them from working!

    Was this post helpful?