JavaScript Code
This is one time integration code for all the campaigns.
Info:
If you have already included this in your footer, no need to put it again.
Static Javascript Widget
<div id='invtrflfloatbtn'></div>
<script>
var ir=ir||function(){(window.ir.q=window.ir.q||[]).push(arguments)};
var invite_referrals = window.invite_referrals || {}; (function() {
invite_referrals.auth = { bid_e :'XXXX48BF2XXXX482D5F8C28425AAC6F',
bid : '29XXX',
t : '420',
userParams : {'fname': ''}};
invite_referrals.async = false;
var script = document.createElement('script');
script.src = "//cdn.invitereferrals.com/js/invite-referrals-1.0.js";
var entry = document.getElementsByTagName('script')[0];entry.parentNode.insertBefore(script, entry); })();
</script>
Important:
For Asynchrous Javascript SDK, set invite_referrals.async to true
invite_referrals.async = true;
Javascript widget with advanced parameters
Set the variables in the code below or leave them blank if not available.
<div id='invtrflfloatbtn'></div>
<script>
var invite_referrals = window.invite_referrals || {}; (function() {
invite_referrals.auth = {
bid_e : 'XXXXX8BF2678A482D5XXXX8425AAC6F',
bid : '29XXX',
t : '420',
email : '',
userParams : {'fname': ''},
userCustomParams : {'customValue': '', 'shareLink': '', 'shareTitle': '', 'shareDesc': '', 'shareImg': ''},
showWidget : ''
};
var script = document.createElement('script');script.async = true;
script.src = (document.location.protocol == 'https:' ? "//d11yp7khhhspcr.cloudfront.net" : "//cdn.invitereferrals.com") + '/js/invite-referrals-1.0.js';
var entry = document.getElementsByTagName('script')[0];entry.parentNode.insertBefore(script, entry); })();
</script>
Parameter | Description | Value | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bid_e * (string) |
Encripted Key | 3B8DXXXXXXXXXXXXXXXXXXXXXXX | |||||||||||||||
bid * (string) |
unique brand id | 29108 | |||||||||||||||
t * (string) |
Used as a authentication parameter in bid_e | 420 | |||||||||||||||
email (string) |
customer's email id | [email protected] | |||||||||||||||
mobile (string) |
customer's mobile number | 9717XXXXXX | |||||||||||||||
userParams (array) |
Other details of customer
|
||||||||||||||||
referrerCode (string) |
referral code given by the referrer to his friend to make sale so that he gets the incentive. | MARCXX | |||||||||||||||
orderID (string) |
order id of the customer | ABXHXXXXX | |||||||||||||||
purchaseValue (string) |
total purchase value of the order | 10000 | |||||||||||||||
userCustomParams (array) |
some custom parameters which can be passed for each user for your referrance
|
||||||||||||||||
showWidget (string) |
widgets you would like to show on particular page. Button Widget (1), Popup (2), Box Widget (3), Inline Share Widget (4), No widget (0) | 1,2,3 |
Updated over 3 years ago