Postback for CPA

1. Introduction

There are 2 types of postback service call:

  • client - server
  • server - server

Client — server is used when user's action results in lead while user is interacting with the page, e.g. when lead is meant to be filling in the registration form.

Server — server is used when user is not interacting with the page while performing a lead, e.g. when lead is meant to be a confirmed order. It means that before lead will be counted, call center operator must call user and at this very moment user does not interact with the page in any way. Therefore advertiser's server interacts with MediaSniper server by transferring display ID.

The postback call's key point is — notification of a lead. All the traffic that MediaSniper contains a unique display ID in get parameter. It is called “s_trk.

In order to inform about lead you need to return MediaSniper s_trk get parameter of user that has performed lead.

Client — server allows to save a key in the cookie and read it at the time of a lead.
Server — server requires to store user's ID that helps to identify users and it must comply with s_trk.

2. Example of postback link

http://pback.mediasniperleads.com/ap_back_url.php?type=accept&pid={partner_ID}&plus={revenue}&offer_id={offer_id}&s_trk={s_trk}&apid={trans_id}¤cy={currency}&s_leadid={s_leadid}
Modifier for lead type is possible (it is used for rejected leads)
type=decline

{partner_ID}Partner ID in MediaSniper system. site_{site_name} where {site_name} for test.ru — testru can be used by default
Finally - site_testru
{revenue}Lead cost. If it is a test campaign, or if lead cost was not discussed separately, "1" can be transferred. The number transferred can be not integer, use separator “.” For example, “154.32”. It implies, that there is rouble currency.
{offer_id}Partner offer ID. If there is 1 offer, “1” can be transferred to this field, if there are more offers, their ID or text name can be transferred.
{s_trk}Value of s_trk get parameter assigned to user.
Example of s_trk:
ChRhZHA0WncRerU-EeSLfgElkJWCShCpsuuqDBjNw4OnBSDkw4OnBQ
{trans_id}Unique transaction number. If transactions are not separately tracked, then Unix Time Stamp can be transferred to this field.
{s_leadid}Lead ID.
Generally, this get is not present, it is added if it is needed to track several lead types. Alphabet a-zA-Z0-9_-
{currency}Currency in which lead is transferred. It is calculated according to the rate of the Central Bank of the Russian Federation and converted to rouble (it is optional field and you can skip this step, in this case converting is not carring out.

3. Postback mechanics

MediaSniper has an aggregate statistics and therefore it can not change lead status. Relevance is supported by storing lead / unlead status. It means that when a lead with hold status for SS is created in CPA - it is an accepted lead. If this lead was accepted in CPA, SS does not process it in any way. If this lead was rejected in CPA, SS creates a new entry with unlead lead status. Therefore, for calculating CPA profit, the sum of all leads with unlead status is deducted from the sum of lead with unlead status.

Example of working with offer with automatical accepting:

If all the leads are considered to be accepted and there are not any functions available such as hold / accepting / rejection and if CPA has three options required to be set: lead / hold / reject, you must fill in only lead field.

Example of working with offer with different status:

There are three status of offer: hold / lead / reject, it is required to transfer type=accept to SS, when lead's status is hold. Once lead has been created in CPA, SS receives information about lead and is able to process it.
When accepting lead in CPA it is not needed to send info to SS, because if you do it, lead can begin to appear double.
When rejecting lead in CPA it is required to send type=decline to SS, so it could count this lead as rejected.

4. About statistics

MediaSniper registers statistics on two parameters: lead and lead now. It allows to count revenue both according to time when user clicked and to time when user performed an action. It is important for counting revenue.
Below you see example of ad campaign that has been running during 1 day:

DateImpressionsClicksLeadLead NoweCPM (lead)eCPM (lead now)
01.08.ХХХХ100001001000100
02.08.ХХХХ1111000100000