When the Convert cookie data cannot be transferred to the purchase confirmation page on another domain


There are some systems that do not allow to pass any data via query parameters to the purchase confirmation page or checkout funnel. This prevents Convert from attributing the conversion to the variation that the visitor saw and registering the conversion.


There is a solution for this, in which the purchase confirmation can call back the first domain and issue the conversion from that domain, being able to read the experiment and variation data and send it to Convert servers to display it on your reports.

We will provide an example with code on how to do this

  1. First, insert a small javascript snippet on the purchase confirmation page. This snippet has variables that should be mapped to your checkout system revenue and product count ones.
    // Map this to your own checkout variables:
    convert_amount = your_own_system_amount;
    convert_count = your_own_system_product_count;

    var newFrame = document.createElement("frame");
    newFrame.id = "pushRevenueframe";
    newFrame.name = "pushRevenueframe";
    newFrame.src = 'http://firstdomain.com/convertrevenue.html?amount=' + convert_amount + '&product_count=' + convert_count;
    var m = document.querySelectorAll('body');
    m[0].appendChild(newFrame).style = 'width:0; height:0; border:0; border:none';
  2. Create a small HTML file with the following code upload it to your first domain server, containing the following:
    // Replace the following with your own snippet
    <!-- begin Convert Experiences code-->
    <script type="text/javascript" src="//cdn-3.convertexperiments.com/js/10000001-10000002.js"></script>
    <!-- end Convert Experiences code -->
    window._conv_q = window._conv_q || [];
    window._conv_q.push(["pushRevenue",convert.getUrlParameter('amount'),convert.getUrlParameter('product_count'), "1231456789"]);
    Make sure you change the snippet to correspond to your own Project Snippet and replace the 123456789 with the id of your own Revenue goal.

    Once done, the first script should call your HTML file, and the HTML file will relay the revenue back to Convert. 
Need assistance? Start a conversation with our Support Team.

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features