Save Website Conversions with a Tracking Script & Order Form

Save Website Conversions with a Tracking Script & Order Form

In this manual, we will set up a system for sending conversions to Keitaro Tracker from a website with an order form integrated with a tracking script.

Integrating a Tracking Script

  1. Create a campaign in Keitaro Tracker.
  2. Next, go to the Integrations tab and select the Tracking script:

         3. Insert the code from Keitaro Tracker to a <head> tag on your landing page.

Now we need the code for sending conversions.

Setting up the Conversions Sending

  1. Copy the following code:
<script type='application/javascript'>
function reportConversion(el, status, params) {
    var form = (el && el.form) ? el.form : el;
    var params = {};
    [].map.call(form.elements, function(el) {
      if (el.name != '') {
          params[el.name] = el.value;  
      }
    });
    KTracking.reportConversion(0);
    return true;
};
</script>

         2. Insert the code to the <head> tag below the previously inserted code:

         3. Now we need to add sending the conversions code under the button of sending the order.

This is the code:

onclick="reportConversion(event.target, status, params)"

You can add the status and the payout sum, e.g.:

<button onclick="reportConversion(event.target, 'lead', {payout: 10})">Order now</button>

Insert this code under each of the buttons if there are more than one button on a landing page:

         4. Save the index.html file and upload it to the hosting. You can check the conversions log at Maintenance > Logs > Received postbacks in Keitaro Tracker.

Setting up subid (Optional)

Suppose the traffic goes to the website through the Keitaro Tracker campaign link, not to the website link directly.

In that case, you need to configure the transfer of the _subid parameter to exclude duplicate clicks. Just add & _subid = {subid} to the offer URL:

https://website.ru/?_subid={subid}

If You Have Additional Questions

Feel free to contact our support if there are any questions left — we will be happy to help out.

author avatar
Keitaro Team
Team to deliver fresh and quality content!

Leave a Reply

Your email address will not be published. Required fields are marked *