Conversion Api for referral code based tracking

You can directly integrate the referral code based conversion tracking in your application using the “Conversion API“. It will return response whether the referral was valid. You can learn more about referral code based tracking here. The API and response are explained below.

Select All

$bid = '52X'; 
$secretKey = '7ABZC3XXXXXXXXXXXXX'; 
$campaignID = '';
$email = ''; //set user email
$orderID = ''; //set order id
$referrerCode = ''; 
$http_val = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
$result = file_get_contents($http_val.''.$secretKey.'&bid='.$bid.'&campaignID='.$campaignID.'&email='.$email.'&orderID='.$orderID.'&referrerCode='.$referrerCode);

Parameter Description Value
secretKey *
secret key for authentication 3B8DXXXXXXXXXXXXXXXXXXXXXXX
bid *
unique brand id 52X
campaignID *
campaign id of the running campaign 10XX
referrerCode *
referral code given by the referrer to his friend to make sale so that he gets the incentive MARXXX
orderID *
order id of the customer ABXHXXXXX
customer's email id
customer's mobile number 9717XXXXXX
total purchase value of the order 10000

Json Response

response message Description
success conversion successful you get an array of conversion details (conversion_details), which is defined below

conversion_details (array)

Parameter Description Value
referrer_name name of the referrer (who referred his friend) Robert Downy
referrer_email email id of the referrer
referee_name name of the referee (friend) Cristian Bale
referee_email email id of the referee
orderID orderID passed by you in javascript code ASDXXXXX
purchaseValue purchaseValue passed by you in javascript code 1000
fail no conversion there is no conversion
fail Access Denied Authentication failed. Invalid secret key or brand id.
fail Account Inactive Account expired. Need to upgrade to an appropriate plan.
fail Parameters missing Pass all compulsory parameters as defined above.