You can trigger the referral tracking manually through a javascript function as explained below.
1.) Load the invitereferrals javascript file on page load
<div id=”invtrflfloatbtn”></div>
<script>
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>
2.) Create trigger function to initiate the invitereferrals widget. Note the line in bold. You can also pass any of the variables explained in documentation here.
<script type=”text/javascript”>
function triggerInviteReferrals(){
var invite_referrals = window.invite_referrals || {}; (function() {
invite_referrals.auth = { bid_e : ‘XXXXXXxXXXXXXXXXXXXXXX’, bid : ‘XX’, t : ‘XXX’ };
invite_referrals.manual.launch();
})();
}
</script>
3.) Call “triggerInviteReferrals” function created in step 2 to trigger invitereferrals widget anywhere.