Receiving postbacks

How it works?

Each visitor in Keitaro has its own unique SubID. It must be passed to an affiliate network through a macro {subid}:

http://affilaite.com/offer?clickid={subid}

This is just an example of URL, each affiliate network has its own mechanism for passing subid.

Then you need to configure a postback at the affiliate network that will be called with each new conversion or if the status of the conversion is changed. Each TDS has its own unique address for receiving postbacks. You can take it at the “Postback” page in the campaign.

Keitaro expects to get back the passed SubID by the parameter sub_id, otherwise the conversion will be not counted.

How can I connect postback to a partner page?

  1. At the campaign page click Postback in menu.
  2. Choose your partner page from preset list or leave the “Default” value.
  3. Check if the instruction on partner links setup has appeared. If not, please find the instruction on subid transfer on your partner page website.
  4. Insert the URL you got in postback settings on your partner page website.

Which parameters are transmitted in postbacks?

  • subid — visitor id generated by Keitaro (mandatory)
  • tid — Transaction ID, unique action ID from the partner page. Necessary if rebills occur
  • revenue — the sum of the earned revenue
  • cost — the cost of the lead
  • status — status of conversion
  • sale_status — which status is considered as sale. Example: “&sale_status=status1,status2”
  • lead_status — which status is considered as lead. Example: “&lead_status=status3,status4”
  • rejected_status — which status is considered as rejected. Example: “&rejected_status=status5,status6”
  • currency —  currency of revenue and cost (RUB, USD, or EUR)
  • extra_param_1, extra_param_2…, extra_param_7 — additional information which will be available in “Conversion” report
  • return — string to return. Sometime affiliate networks expect specific answer.

All the other parameters transmitted will be available in “Conversions” report under “Parameters” section.

How to send postback as a pixel?

Add to your postback &return=gif:

<img src="http://domain.com/123/postback?....&return=gif" width=1 height=1/>

How to get a certain response from TDS?

Add to your postback a necessary response &return=OK:

http://domain.com/123/postback?....&return=OK

If the parameter name "subid" is occupied, how can I transmit my subid?

Transmit them through parameters: sub_id_1, sub_id_2, sub_id_3, sub_id_4. Accordingly, macros for transmission to offers are {sub_id_1}, {sub_id_2}, {sub_id_3}, {sub_id_4}. Check the URL composing and subid addition rules in Help section at the partner page.

How are rebills counted?

Before postback processing in Keitaro conversion statement presence is checked by “subid + tid” keys. If the statement is found, postback is ignored. That is why tid parameter should be transmitted with operational value to count the rebills.

Set wrong status?

You may specify statuses in params “lead_status”, “sale_status”, “rejected_status”. Example:

http://tds.com/123/postback?lead_status=register&sale_status=paid,rebill&rejected_status=refund...

What if postback is not working?

Check var/log/postbacks.log file contents. Please find the detailed explanation on errors below.

Log error "Incorrect SubId..."

Reasons:

  1. Offer visitor subid is not transmitted in the stream;
  2. Subid is not returned in postback;

Solution:

  1. Check that the URL contains subid transmission through {subid} macros. Check subid transmission instructions in Help section at the partner page.
  2. Check that there is subid transmission in postback. Check which macros is used for it in Help section at the partner page. Also try to Make a New Postback URL

Log error "Conversion by pair "SubId + tid" is already exists. Postback ignored."

Reasons:

  1. Lead or sale notification has been sent twice by the partner page.
  2. Rebill was made, but tid (Transaction ID) was not transmitted.

Solution:

  1. In Help section at the partner page check which macros is used for Transaction ID (unique operation ID). It can also be named txid or oid.

How are currency converted?

At the time of the receipt of payment the amount of money will be converted according to current quotes from Google Finance to a currency which is set at Keitaro settings.

Why doesn't a tested postback from an affiliate network add a conversion?

Check if during the test an existing sub_id is passed. You can take it from the one of the transitions in the detail report.

How to send a postback from my site?

To do that you need to make two things: - pass visitor subid - send a postback after visitor do an action

1. Add passing subid in the stream. For example, http://mysite.com/welcome.html?subid={subid}.

2. Add this code to the entry pages (for example, welcome.html):

<?php
if (!headers_sent() && !session_id()) {
      session_start();
}
if (isset($_GET['subid'])) {
    $_SESSION['subid'] = $_GET['subid'];
}
?>

3. Then add this code to pages that shows after a form submitted or action is done:

<?php
$url = 'http://tds/POSTBACK_KEY/postback?revenue=200.10&subid=' . $_SESSION['subid'];
file_get_contents($url);
?>

How to pass conversions in tracking mode?

Postback Connection to admintad.com

  1. Go to Postback page in Keitaro (Campaign > Postback);
  2. Choose “admitad.com” from the list;
  3. Copy the contents of Postback URL;
  4. Go to “Tools > Postback URL” page at admitad.com;
  5. Click “Add Postback URL”;
  6. Check all the status boxes in “Status” line;;
  7. Insert the Postback URL copied before into “Link” field;
  8. Press “Save” at the very bottom of the page.

Postback Connection at cityads.ru

The partner page accepts subid through “sa” parameter. Stream URL will look like this:http://www.cityads.ru/click-NNNNNNNN-YYYYYYYYY?sa={subid}, where {subid} is a macros which adds the subid value.

At “Operations/Postbacks” page choose CityAds from the list of presets. Copy the “postback acceptance URL”.

In partner page personal area go to “Conversion Postback” page and click “Create”. Insert the URL you copied into “Postback URL” and check all the parameters.