# Sending postbacks

Sending postbacks is used to notify advertising networks, banner networks or other analytic tools about the received conversions.

You can add a postback of a third party service in the following ways:

  • When creating a traffic source;
  • When creating a campaign.
  • When creating a traffic source from a template, the Postback URL field is filled automatically.

# How to set up the sending of postback for a new source?

If there is no your traffic source in the templates, you need to find out:

  • Does your traffic source support postbacks.
  • Which token is used to send external_id (ID of a click).
  • What address to send postbacks to.

After receiving all the information, you need to configure the following:

  1. Click on the edit parameters of the new traffic source;
  2. Next to external_id set the token for passing the click ID. Usually this is similar to {UID}.
  3. In the “Postback URL” field, paste the received postback of the source. Where you need to pass ID of a click, enter the macro {external_id}. For example, http://adnetwork.com/postback?id=123&uid={external_id}.
  4. You can add a postback in the campaign settings in a similar way, but with some features: it is necessary to set which statuses will be sent and for what sources (these are not traffic sources, but the contents of the parameter source) - you can leave the last part empty for not checking the source.

If you have any questions about the correctness of sending postbacks, see the log “Sent postbacks” on the page “Maintenance > Logs”.

# What macros are available?

Available all macros from page macro_list. Also you can use these macros:

  • {external_id} — click id that was sent by traffic source
  • {status} — conversion status
  • {tid} — transaction id

# What if the Source has another status names?

You can specify how to convert them:

{status: lead=install sale=bill rejected=trash}

# How to send other statuses

You can determine how to convert statuses for a {status} macro, e.g. -1 - cancel, 0 - sign up, 1 - deposite:

{status: rejected=-1 lead=0 sale=1}

# How to see the results of sent postbacks?

Show log entries on page “Maintenace > Logs > Sent postbacks”.

# When does Keitaro send a postback?

When Keitaro receives a postback with a conversion, it sends the postback to the traffic source.

# How to exchange currency while sending an S2S postback

Use {conversion_revenue: eur} macros with eur/usd/rub values to send the S2S postback in a new currency.

# How to send notifications to Telegram

  1. Create a new bot on Telegram using @BotFather and a /newbot command.
  2. Add the name and save the token you receive.
  3. Open the chat with your new bot and write it the message.
  4. To get the bot’s ID to send messages make a browser request with the following url: api.telegram.org/botREPLACE/getUpdates Where insert bot’s token from the step #2 instead the REPLACE.
  5. You’ll get the id from the message line in the response: «:{«message_id»:X,»from«:{«id»:ID}» Your real identificator will be written instead of ID.
  6. If everything is correct and you got the response, you may use the URL from step 4 as an S2S postback link in a campaign in Keitaro. E.g.: https://api.telegram.org/botREPLACE/sendMessage?chat_id=ID&text={campaign_name}:{status}:{conversion_revenue} where {campaign_name} is the campaign’s name from Keitaro, {status} is for conversion status, and the {conversion_revenue} is for the conversion’s payout sum.
Last Updated: 12/15/2020, 7:55:34 PM