# S2S postbacks

S2S postbacks is a tool for analytics and data collection on the side of the traffic source or on any external resource.

# Adding S2S postback

Keitaro adds S2S postbacks automatically when you choose a traffic source, but you may also add additional S2S postbacks.

  1. Open the campaign page.
  2. Open S2S Postbacks tab.
  3. Press Add a postback.

  • URL — set the address where to send a postback;
  • Sending method — must be specified in the Source, GET or POST;
  • Status — choose the conversion status to send a postback.

GET method sends the collected form information to the script as a URL.

POST method transmits data in such a way that the site user does not see the data transmitted to the script.

# S2S traffic source

Check out the page S2S postback traffic source

# S2S macros (placeholders)

Check out the page S2S postback macros

# S2S postback FAQ

Why S2S postback is not sent?

Check whether the Source with S2S link is set in the campaign settings or whether the configured postback is present in the campaign settings in the S2S postbacks tab. If postback is configured, move on to the next step. If there is no postback, set it up according to the instructions above.

For information about the status of sending conversions from the tracker, see the Log of sent postbacks Maintenance → Logs → S2S postbacks.

In the postback log you can see which subid initiates S2S sending, which link converted from Keitaro and which response was received from the Source. If there is an error in the answer, you must contact the Source for an explanation of the error.

Make sure that the S2S link is populated with the Source click ID value. That is of the {external_id} placeholder, the click ID value from the Source is substituted. If the value is not substituted, make sure that traffic in the Source flows to the link that contains the {external_id} parameter. If there is no parameter, go to the settings section in this article, where you configure the Source. The setting looks like in step 3 in the screenshot above.

Check what conversion status was received in the tracker and make sure that in the S2S postback settings there is a checkbox — send conversions with status.

Where can I find the log of sent S2S postbacks?

For information about the status of sending conversions from the tracker, see the Log of sent postbacks Maintenance → Logs → S2S postbacks.

How to send S2S postback to Telegram?
  1. Create a new bot on Telegram using @BotFather and a /newbot command.
  2. Save the received token.
  3. Open the chat with your new bot and write a message.
  4. To get the bot's ID to send messages, make a browser request with the following url:

Instead of REPLACE you need to insert the bot's API token in the format 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

  1. You'll get the ID from the message line in the response:
:{"message_id":X,"from":{"id": ID}}`

Instead of ID you need to insert the real ID.

  1. Send the bot an API message with the command https://api.telegram.org/botREPLACE/sendMessage?chat_id=ID&text=text Where instead of REPLACE you need to insert the bot's API token, and instead of ID — the real ID.

  2. 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. For example: 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 conversion status and the {conversion_revenue} is the conversion's payout sum.

How to send to AppMetrica?

Add additional S2S postback:


Replace API_KEY and APPLICATION_ID with the values. Set the device_id parameter in the campaign parameters.

Read postback documentation in AppMetrica.

How to configure sending postback in Mgid?

Read the article on the blog Mgid.

When is S2S postback sent?

Requests that need to be sent are collected in a queue and sent in a separate queue. Duplicates are excluded from the queue.