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

fname
(string)
first name of the customer Mike
lname
(string)
last name of the customer Tyson
birthday
(string)
birth date of the customer 1983-10-25
gender
(string)
gender (male/female) of the customer male
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

customValue
(string)
Any custom parameter for your referrance so that you can identify that user in your database 378CNBHJ34
shareLink
(string)
url where referee will be redirected after clicking on the shared feed http://www.example.com?uid=1234
shareTitle
(string)
Title of the shareLink to be shared on facebook dynamically Awsome Eyeglasses
shareDesc
(string)
Description of the shareLink to be shared on facebook dynamically Buy eyeglasses online for men and women. #referrals #eyeglasses
shareImg
(string)
Image Source of the shareLink to be shared on facebook dynamically http://www.example.com/ images/img.jpg
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