Keitaro can accept postbacks from partner networks. To receive postback you need to add an affiliate network at the page “Affiliate Networks”. First check if your affiliate network is in the template. In this case, you immediately get the ready postback. If there is no your affiliate network, then you can create a Postback URL by yourself. Read about it below.

How to set up a postback with an affiliate network (video)

How to get postback URL

When you add an affiliate network you will see a base address in the field “Postback URL”. Now you need to find documentation about postback settings on the affiliate's website. You need:

List of tokens

Instruction about passing a subid/clickid

The list of tokens will help to form a chain of parameters. For example, there are tokens at the advertising network {SID1}, {STATUS}, {PAYOUT}. So we add to the address such parameters: &subid={SID1}&status={STATUS}&payout={PAYOUT}. The full list of available parameters of Keitaro you can see at the section below.

Now you need to determine through which parameter you can pass your subid. For example, it is passed through sid1. So, you need to type sid1={subid} in field “Offer Params”.

If you don't see any records at the conversion log, see the page “Maintenance > Logs > Received postbacks”.

Where Can I Get Postback URL?

On page “Maintenance > Postack URL” or create a new affiliate network.

These parameters are used to “teach” Keitaro the statuses of the affiliate network

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”

Conversion statuses

In Keitaro conversion has 4 states:

Lead — lead was received, but the payment has not yet been transferred. In affiliate network this state is called “Hold.”

Sale — lead is confirmed, the payment was made.

Rejected — lead was rejected by the affiliate network. If previously the conversion had a “Sale” status, the payment is canceled.

Rebill — the conversion in this status indicates that the visitor has made another purchase or extension of the service. You can see this conversion in the Conversion report, but the indicators of leads and sales are not increasing at the same time. If the affiliate network supports upsells (rebills), you must enable the “Upsell” option in the settings of the offer.

Possible state transitions:

Sale

Reject

Sale → Rebill (if the option “Upsell” is enabled in the offer)

Lead → Sale

Lead → Sale → Rebill

Lead → Reject (if the option “Upsell” is enabled in the offer)

Such a change of states “Lead → Lead” is also allowed. This allows you to organize a multi-stage lead management. For example, “Cart → Order → Payment → Call”.

The names of the statuses can be any, but they must necessarily be associated with one of the system statuses. You can bind them through the parameters of the postback. For example, we have 3 statuses: accept, confirm, reject. Then we pass in the postback the following:

&lead_status=acceprt&sale_status=confirm&rejected_status=reject

In the conversion report you can add the “Original status” column to see the received statuses.

How to teach Keitaro different statuses

The names of the statuses can be any, but all these statuses should be connected with Keitaro statuses. The connection can be established with postback parameters, e.g. we have 3 statuses accept, confirm, reject, then we need to add to the postback the following:

&lead_status=accept&sale_status=confirm&rejected_status=reject

You can add “Original Status” column in reports to see the received statuses.

Sending postbacks from website

First, you need to configure the passing of the “Sub ID” click. It is passed via streams by adding a parameter _subid={subid} to the URLs (offers, landing pages, direct URL). If you've added website as landing page, you don't need to add that parameter to URL, it's already sending.

Sending postbacks on PHP

Here is an example of sending postback on PHP.

1. On the pages where the first visit to your site takes place, you need to take subid and save it to the session: