601var statParams = {};602var isSendScrollEvent = { p10: 0, p25: 0, p50: 0, p75: 0, p90: 0 };603// var dStartReadTime = new Date();604var isWindowActive = true;605606var isCookieDisabled = window['tildastatcookie'] === 'no';607if (!window['tildastatcookie']) {608if (allRec) {609isCookieDisabled = allRec.getAttribute('data-tilda-cookie') === 'no';610}611}612
if (window['tildastatcookiegdpr'] === 'yes' && isCookieDisabled === false) { isCookieDisabled = true; var cookiesConsent = t_stat__getCookie('t_cookiesConsentGiven'); if (cookiesConsent === true) { var cookiesCategories = t_stat__getCookie('t_cookiesCategories'); if (typeof cookiesCategories === 'string' && cookiesCategories.indexOf('analytics') > -1) { isCookieDisabled = false; } } } //console.log(isCookieDisabled); var isScrollTrack = window['tildastatscroll'] === 'yes'; if (typeof window['tildastatscroll'] == 'undefined') { if (allRec) { isScrollTrack = allRec.getAttribute('data-tilda-stat-scroll') === 'yes'; } } var userid = ''; var sessionid = ''; var isInited = false; window.tildastat('create'); setTimeout(function () { window.tildastat('pageview'); window.tildastat('readtime'); window.tildastat('scroll'); }, 500); //load script to handle errors var errorScriptID = setInterval(function () { if ( (typeof window.t_jserrors === 'object' && window.t_jserrors.length > 0) || (typeof window.t_cdnerrors === 'object' && window.t_cdnerrors.length > 0) || (typeof window.t_ajaxerrors === 'object' && window.t_ajaxerrors.length > 0) ) { if (typeof t_errors__sendJSErrors !== 'function') { var s = document.createElement('script'); s.src = 'https://static.tildacdn.' + t_stat__getRootZone() + '/js/tilda-errors-1.0.min.js'; s.async = true; document.body.appendChild(s); clearInterval(errorScriptID); } } }, 2000); // check is export project var icon = document.querySelector("link[rel*='shortcut icon']"); var links = document.querySelectorAll("link[href*='tilda.ws/project']").length; if (!links) links = document.querySelectorAll("link[href*='ws.tildacdn.com/project']").length; var iconHref = icon ? icon.getAttribute('href') : ''; var tildaScripts = document.querySelector("script[src*='js/tilda-scripts']"); var isExported = tildaScripts ? tildaScripts.src.indexOf('tildacdn') === -1 : false; if (!isExported) { isExported = icon && iconHref.indexOf('static.tildacdn.' + t_stat__getRootZone()) !== -1 && iconHref.indexOf('tilda.') !== -1 && iconHref.indexOf('/tildafavicon.ico') !== -1 && !document.querySelector('table#allrecords') && !(window.location.hostname.indexOf('.tilda.ws') !== -1) && !links; } // append performance script to the page, which measure page speed params, like // FP - first paint // FCP - first contentful paint // LCP - largest contentful paint // DOMloaded if (typeof navigator.sendBeacon !== 'undefined' && !/Bot/i.test(navigator.userAgent) && !isExported) { var randomValue = Math.floor(Math.random() * 5); if (randomValue === 1) { t_stat__onLoad(function () { var performanceScript = document.createElement('script'); performanceScript.async = true; performanceScript.type = 'text/javascript'; performanceScript.src = 'https://static.tildacdn.' + t_stat__getRootZone() + '/js/tilda-performance-1.0.min.js'; document.body.insertAdjacentElement('beforeend', performanceScript); }); } } function t_stat__onLoad(callback) { document.readyState === 'complete' ? callback() : window.addEventListener('load', callback);