Knowledgebase
Knowledgebase:
Traffic Stars S2S Tracking API
Posted by Slavina Proeva on 20 February 2018 12:08 PM

To use the Traffic Stars server to server tracking you’ll need to receive a unique click_id parameter (40 characters [0-9a-f]) and send it back to us.

In order to receive the click_id, you’ll need to append this placeholder {click_id}.

 

Here’s an example :

http://example.com/?some_param=1234567&tracking_param={click_id}&some_nother_param=test

 

When you run a campaign, we will dynamically replace that parameter for every click :

 

http://example.com/? some_param=1234567&tracking_param=c86b8a88b91228911e723b93c65a5900bb49bc99&some_another_param=test




When one of the clicks is successful (that could be a lead, purchase, download etc..) you will need to call our postback URL, including the click_id and it must be posted back as HTTP GET request.

 

Here’s an example :

http://tsyndicate.com/api/v1/cpa/action/{click_id}

You will need to replace the {click_id} with whichever macro your system uses to send back the click_id.

 

When a click is successful, your system will call the URL like this :

http://tsyndicate.com/api/v1/cpa/action/c86b8a88b91228911e723b93c65a5900bb49bc99




If the Traffic Stars platform successfully receives the click_id, the service will return JSON response with status.

{

"ok": true

}



Track multiple leads and different prices

 

Traffic Stars allows you to track multiple leads and different prices on a single {click_id}. The postback must be called via HTTPS and must contain the values lead_code and key parameters:

 

https://tsyndicate.com/api/v1/cpa/action/{click_id}?value={price}&lead_code= {unique_lead_code}&key={secret_key}

 

Where {price} is the float type price of the lead, and {unique_lead_code} is a unique code generated by user for each postback and {secret_key} is the unique secret key available in the client admin panel under the "Tracking & API" page - S2S tracking.

 

Here’s an example:

 

https://tsyndicate.com/api/v1/cpa/action/c86b8a88b91228911e723b93c65a5900bb49bc99? value=2.1&lead_code=abcd1234567890&key=123456789012345678901234567890abcdef



Troubleshooting

 

Invalid code message returned when the {click_id} we receive in postback has an incorrect format :

 

{
"error":{

"msg":"invalid code"

}

}

 

Invalid key message returned when {secret_key} value is incorrect or when user is not permitted to use multiple leads postback

 

{

"error":{

"msg":"invalid key"

}

}

 

Invalid key message returned when we cannot parse the price value

 

{

"error":{

"msg":"invalid price value: 'Err message'"

}

}



If the price value exceeds the allowed price range set between 0.01 and 200.0

 

{

"error":{

"msg":"the price should be between %.3f and %.3"

}

}



If the lead_code is used but not via HTTPS protocol

 

{

"error":{

"msg":"The transfer of the lead_code is possible only with the https protocol"

}

 

}

 

(2 vote(s))
Helpful
Not helpful

Comments (0)