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

ParameterDescriptionValue
conversionwhether a successful conversion or notsuccess / fail
referrer_namename of the referrer (who referred his friend)Robert Downy
referrer_emailemail id of the referrer[email protected]
referee_namename of the referee(friend)Cristian Bale
referee_emailemail id of the referee[email protected]
orderIDorderID passed by you in javascript codeASDXXXXX
purchaseValuepurchaseValue passed by you in javascript code1000
referrer_convertsNo. of conversions by referrer2
referrer_customValuecustom value passed for referrerxxxxxxx
goal_completewhether the goal has completed. Eg. If you are rewarding referrer on 5 conversions, then for 5th conversion it will be 1 else 01