var facebookId = '323784018067522'; function facebookPixel(facebookId) { !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); var isGdpr_enabled = (getCookie('GDPR_HIDE') == 'true'); var isGdpr_analyticsAllowed = (getCookie('gdpr_analytics') == 'true'); if(isGdpr_enabled && !isGdpr_analyticsAllowed) { fbq('consent', 'revoke'); } else { fbq('consent', 'grant'); } fbq('init', facebookId); fbq('track', 'PageView'); setTimeout(function () { fbq('track', 'ViewContent') }, 3000); setTimeout(function () { fbq('track', 'PageView') }, 3000); 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 + ";" + expires + ";path=/" } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1) } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length) } } return "" } var ftctod = parseInt(getCookie('ftctod')); ftctod = (ftctod) ? ftctod : 0; var fttopv = 0; setInterval(function () { if (document.hasFocus()) { fttopv += 5; fbq('trackCustom', 'TimeOnPage', { sec: fttopv }); fbq('trackCustom', 'TimeOnDomain', { sec: ftctod + fttopv }); setCookie('ftctod', ftctod + fttopv, 360) } }, 5000); } facebookPixel(facebookId);