Javascript Callback
javascript-callback
Javascript Callback
Use following code to get javascript callback of referral conversion.
<script>
window.invite_referrals_ready = function() {
invite_referrals.callback.listen('Conversion Response', function(event, response){
console.log(response); //view the callback response array in console
});
};
</script>
Json Response
Parameter | Description | Value |
---|---|---|
conversion | whether a successful conversion or not | success / fail |
referrer_name | name of the referrer (who referred his friend) | Robert Downy |
referrer_email | email id of the referrer | [email protected] |
referee_name | name of the referee(friend) | Cristian Bale |
referee_email | email id of the referee | [email protected] |
orderID | orderID passed by you in javascript code | ASDXXXXX |
purchaseValue | purchaseValue passed by you in javascript code | 1000 |
referrer_converts | No. of conversions by referrer | 2 |
referrer_customValue | custom value passed for referrer | xxxxxxx |
goal_complete | whether the goal has completed. Eg. If you are rewarding referrer on 5 conversions, then for 5th conversion it will be 1 else 0 | 1 |
Updated about 4 years ago