# Tracking Script

TIP

For displaying the tracker feeds or perform actions, use KClient JS.

The tracking script is a small JS library that knows how to pass click and conversion information. It allows you to quickly connect Keitaro to the already working landing.

The code for connecting the script is available in Campaigns > Tracking.

Disadvantages

  • It doesn't support splitting landing pages and redirects to a landing page;
  • Redirects are not supported.

# Usage

WARNING

The script requires the site that uses HTTPS.

  1. Open the Tracking tab on the campaign page;
  2. Select "Tracking Script" from the list and follow the instructions.

# Counting non-unique clicks

The tracking script counts only the first visit. You can turn on non-unique counting on the integration page or add _new=1 to the links.

Example: http://landingpage.com/?_new=1.

# Sending postbacks

# Using offers

TIP

In order for the scheme to work, the thread must contain the offers.

# Getting subid

# Advanced usage of KTracking.reportConversion

KTracking.reportConversion(payout, status, params, cb);
1
  • payout. The payout amount.
  • status. The conversion status (lead, sale, or rejected).
  • (Optional) params. The object with parameters (for example, {sub_id_1: 'order-form', sub_id_2: 'submit'}). The sub_id_1 to sub_id_30 parameters are supported.
  • (Optional) cb. The function executed after sending data to the tracker (example, funtion(){ window.alert("Form sent")}).

# Examples

Send a sale conversion:

KTracking.reportConversion(0, 'sale');
1

Send with additional parameters:

KTracking.reportConversion(revenue, 'lead', {sub_id_1: 'johh@gmail.com', sub_id_2: 'John Smith'})
1

Send as rejected conversion:

KTracking.reportConversion(0, 'rejected');
1

Send as re-sale:

var tid = Math.floor(Math.random() * 1000000000);
KTracking.reportConversion(revenue, 'sale', {tid: tid})
1
2

tid value must be unique.