<!-- STARTING GENIUS REFERRALS CODE SNIPPET -->
<span class="gr-widget-design" id= "gr-referral-program-home-page-1646"> </span>
<script type="text/javascript">
!function(){
const grSetting={
"grTemplateSlug": "referral-program-home-page-",
"grCustomerCurrencyCode": "USD",
"grLanguage": "es",
"grInstallMethod":"embeddedcode"
},
e=window,t=document;e.addEventListener("load",function(){const e=t.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://e9f87d8c82343264e6ba-2977c39e5e9390b1a89ab5ed2a171102.ssl.cf1.rackcdn.com/toolbox/geniusreferrals-toolbox_3.0.0.min.js",e.onload=function(){GRToolbox.init(grSetting)};const n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)},!1)}();
</script>
<!-- ENDING GENIUS REFERRALS CODE SNIPPET -->
<!-- STARTING GENIUS REFERRALS CODE SNIPPET -->
<span class="gr-widget-design" id= "gr-referral-program-home-page-1646"> </span>
<script type="text/javascript">
!function(){
const grSetting={
"grTemplateSlug": "referral-program-home-page-",
"grCustomerCurrencyCode": "USD",
"grLanguage": "es",
"grInstallMethod":"embeddedcode"
},
e=window,t=document;e.addEventListener("load",function(){const e=t.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://e9f87d8c82343264e6ba-2977c39e5e9390b1a89ab5ed2a171102.ssl.cf1.rackcdn.com/toolbox/geniusreferrals-toolbox_3.0.0.min.js",e.onload=function(){GRToolbox.init(grSetting)};const n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)},!1)}();
</script>
<!-- ENDING GENIUS REFERRALS CODE SNIPPET -->
<!-- STARTING GENIUS REFERRALS CODE SNIPPET -->
<span class="gr-widget-design" id= "gr-referral-program-home-page-1646"> </span>
<script type="text/javascript">
!function(){
const grSetting={
"grTemplateSlug": "referral-program-home-page-",
"grCustomerCurrencyCode": "USD",
"grLanguage": "es",
"grInstallMethod":"embeddedcode"
},
e=window,t=document;e.addEventListener("load",function(){const e=t.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://e9f87d8c82343264e6ba-2977c39e5e9390b1a89ab5ed2a171102.ssl.cf1.rackcdn.com/toolbox/geniusreferrals-toolbox_3.0.0.min.js",e.onload=function(){GRToolbox.init(grSetting)};const n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)},!1)}();
</script>
<!-- ENDING GENIUS REFERRALS CODE SNIPPET -->
<!-- STARTING GENIUS REFERRALS TRACKING CODE -->
<script type="text/javascript">
!function(){
const grSetting={
grCookieLifeTime:"180"
},
e=window,t=document;e.addEventListener("load",function(){const e=t.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://e9f87d8c82343264e6ba-2977c39e5e9390b1a89ab5ed2a171102.ssl.cf1.rackcdn.com/toolbox/geniusreferrals-toolbox_3.1.2.min.js",e.onload=function(){GRToolbox.catchReferrer(grSetting)};const n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)},!1)}();
</script>
<!-- ENDING GENIUS REFERRALS TRACKING CODE -->
jQuery( document ).ready(function() {
/*
* Subscribing to Register Form Submit
*/
jQuery("#user-register-form").submit(function(event){
var toolbox = new grToolbox();
toolbox.processCustomer({
"grUsername" : "demo@geniusreferrals.com",
"grTemplateSlug": "my-drupal-default",
"grCustomerName": jQuery('#edit-name').val(),
"grCustomerLastname": jQuery('#edit-name').val(),
"grCustomerEmail": jQuery('#edit-mail').val(),
"grCustomerCurrencyCode": "USD",
"grCanRefer": false });
event.preventDefault();
var form = this;
setTimeout(function(){form.submit(); }, 2500);
});
});
........
function bartik_preprocess_page(&$variables) {
/**
* Adding custom javaScript
*/
drupal_add_js('https://www.geniusreferrals.com/bundles/portal/js/geniusreferrals-tool-box_1.0.6.js', 'external');
drupal_add_js(drupal_get_path('theme', 'bartik') .'/js/genius.referrals.js');
}
........
jQuery( document ).ready(function() {
/*
* Subscribing to Register Form Submit
*/
jQuery("#user-register-form").submit(function(event){
var toolbox = new grToolbox();
toolbox.processCustomer({
"grUsername" : "demo@geniusreferrals.com",
"grTemplateSlug": "my-drupal-default",
"grCustomerName": jQuery('#edit-name').val(),
"grCustomerLastname": jQuery('#edit-name').val(),
"grCustomerEmail": jQuery('#edit-mail').val(),
"grCustomerCurrencyCode": "USD",
"grCanRefer": false });
event.preventDefault();
var form = this;
setTimeout(function(){form.submit(); }, 2500);
});
/*
* Subscribing to Contact Form Submit
*/
jQuery("#contact-site-form").submit(function(event){
var toolbox = new grToolbox();
toolbox.processCustomer({
"grUsername" : "demo@geniusreferrals.com",
"grTemplateSlug": "my-drupal-default",
"grCustomerName": jQuery('#edit-name').val(),
"grCustomerLastname": jQuery('#edit-name').val(),
"grCustomerEmail": jQuery('#edit-mail').val(),
"grCustomerCurrencyCode": "USD",
"grCanRefer": false });
event.preventDefault();
var form = this;
setTimeout(function(){form.submit(); }, 2500);
});
});