(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://code.tidio.co/a7z0jnbtudlryet6u8f5vjluho2lghqd.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); } loadTidio() //////////// facebook pixel function loadFacebookPixel(){ if(window.fbq){ return ; } !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'); //window.fbq('init', '1581076962062583'); window.fbq('init', '524560735252248'); } window.facebookPixel = { accepted: false, queue: [], run: function(f){ if(this.accepted){ return f() } this.queue.push(f) ; }, setAccept: function(accept){ this.accepted = accept; if(accept){ loadFacebookPixel(); while(this.queue.lenth>0){ this.queue.shift()() ; } } } } ; window.facebookPixel.pageView = function(){ this.run(()=>{window.fbq('track', 'PageView');}) } window.facebookPixel.purchase = function(amount, currency = "EUR"){ this.run(()=>{window.fbq('track', 'Purchase', {currency: currency, value: amount});}) } window.facebookPixel.addToCart = function(amount, currency = "EUR"){ this.run(()=>{window.fbq('track', 'AddToCart', {currency: currency, value: amount});}) } window.facebookPixel.viewProduct = function(productName){ this.run(()=>{window.fbq('track', 'ViewContent', {content_name: productName});}) } //Cookie consent // window.axeptioSettings = { // clientId: "60a8cf6bd1abc439d661e63d", // cookiesVersion: "polycrea passion-base", // }; // (function(d, s) { // var t = d.getElementsByTagName(s)[0], e = d.createElement(s); // e.async = true; e.src = "//static.axept.io/sdk.js"; // t.parentNode.insertBefore(e, t); // })(document, "script"); // void 0 === window._axcb && (window._axcb = []); // window._axcb.push(function(axeptio) { // axeptio.on("cookies:complete", function(choices) { // window.facebookPixel.setAccept(choices.facebook_pixel); // document.querySelector(".axeptio_mount").style.display = "none"; // }); // }); // window.openCookiesConsent = ()=>{ // document.querySelector(".axeptio_mount").style.display = "block"; // openAxeptioCookies(); // } //# sourceURL=global_js.js