function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + ";secure" + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i -1) { $('#optInMessage').show(); } else { $('#optInMessage').hide(); // AND FIRE ALL TAGS SEND THE EVENT TRIGGER $('head').append(gtm_call); // $('head').append(bizible_call); // set tracking cookie setCookie('tracking', 'on', '365'); } } }); }