Javascript Callback

Use following code to get javascript callback of referral conversion.

Select All




<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 example@gmail.com
referee_name name of the referee (friend) Cristian Bale
referee_email email id of the referee example@gmail.com
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
>