From ff1c579f1faa003e461db2534f2606bd4ac4ddaa Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Mon, 8 Apr 2019 18:20:09 +1200 Subject: Reset tracked impressions for searches and only send tracking request when interaction was defined (#14002) * Reset tracked impressions for searches and only send tracking request when interaction was defined * add test to ensure site search clears content impressions --- js/piwik.js | 13 ++++++++++--- js/piwik.min.js | 6 +++--- matomo.js | 6 +++--- piwik.js | 6 +++--- tests/javascript/index.php | 4 ++++ 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/js/piwik.js b/js/piwik.js index 420360c2fa..a41d23376f 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -4986,7 +4986,9 @@ if (typeof window.Piwik !== 'object') { // click on any non link element, or on a link element that has not an href attribute or on an anchor var request = buildContentInteractionRequest('click', contentName, contentPiece, contentTarget); - sendRequest(request, configTrackerPause); + if (request) { + sendRequest(request, configTrackerPause); + } return request; }; @@ -7130,7 +7132,9 @@ if (typeof window.Piwik !== 'object') { trackCallback(function () { var request = buildContentInteractionRequest(contentInteraction, contentName, contentPiece, contentTarget); - sendRequest(request, configTrackerPause); + if (request) { + sendRequest(request, configTrackerPause); + } }); }; @@ -7155,7 +7159,9 @@ if (typeof window.Piwik !== 'object') { trackCallback(function () { var request = buildContentInteractionRequestNode(domNode, contentInteraction); - sendRequest(request, configTrackerPause); + if (request) { + sendRequest(request, configTrackerPause); + } }); }; @@ -7200,6 +7206,7 @@ if (typeof window.Piwik !== 'object') { * @param mixed customData */ this.trackSiteSearch = function (keyword, category, resultsCount, customData) { + trackedContentImpressions = []; trackCallback(function () { logSiteSearch(keyword, category, resultsCount, customData); }); diff --git a/js/piwik.min.js b/js/piwik.min.js index 8bdcb8373a..c91b965c38 100644 --- a/js/piwik.min.js +++ b/js/piwik.min.js @@ -53,7 +53,7 @@ for(dy in c1){if(Object.prototype.hasOwnProperty.call(c1,dy)){dd+="&"+dy+"="+c1[ bA(dh,bE);if(dg){cU={}}}function bU(db,df,de,dd,dc,dg){if(String(db).length&&J(df)){bl(db,df,de,dd,dc,dg)}}function bn(db){if(J(db)){bl("",db,"","","","")}}function bV(dc,de,dd){aH=bc();var db=co("action_name="+t(ai(dc||be)),de,"log");bA(db,bE,dd)}function aW(dd,dc){var de,db="(^| )(piwik[_-]"+dc;if(dd){for(de=0;de0){dc+="&"}else{dc+="?"}var dd=bm();dc=F(dc,ar,dd);ac.setAnyAttribute(db,"href",dc)}function ax(de){var df=ac.getAttributeValueFromNode(de,"href");if(!df){return false}df=String(df);var dc=df.indexOf("//")===0||df.indexOf("http://")===0||df.indexOf("https://")===0;if(!dc){return false}var db=de.pathname||cg(de.href);var dd=(de.hostname||d(de.href)).toLowerCase();if(ao(dd,db)){if(!cB(cO,L(dd))){return true}return false}return false}function cA(db){var dc=c5(db);if(dc&&dc.type){dc.href=p(dc.href);cV(dc.href,dc.type,undefined,null,db);return}if(cH){db=aq(db);if(ax(db)){ce(db)}}}function cr(){return G.all&&!G.addEventListener}function cP(db){var dd=db.which;var dc=(typeof db.button);if(!dd&&dc!=="undefined"){if(cr()){if(db.button&1){dd=1}else{if(db.button&2){dd=3}else{if(db.button&4){dd=2}}}}else{if(db.button===0||db.button==="0"){dd=1}else{if(db.button&1){dd=2}else{if(db.button&2){dd=3}}}}}return dd}function bO(db){switch(cP(db)){case 1:return"left"; @@ -67,8 +67,8 @@ if(db>0){if(!J(dc)){dc=""}if(!w(dc)){dc=String(dc)}bh[db]=dc}};this.getCustomDim if(db===0){return null}return db};this.setCookiePath=function(db){bk=db;bd()};this.getCookiePath=function(db){return bk};this.setVisitorCookieTimeout=function(db){cD=db*1000};this.setSessionCookieTimeout=function(db){ck=db*1000};this.getSessionCookieTimeout=function(){return ck};this.setReferralCookieTimeout=function(db){cZ=db*1000};this.setConversionAttributionFirstReferrer=function(db){bq=db};this.setSecureCookie=function(db){bN=db};this.disableCookies=function(){bg=true;c1.cookie="0";if(b1){aB()}};this.deleteCookies=function(){aB()};this.setDoNotTrack=function(dc){var db=h.doNotTrack||h.msDoNotTrack;cK=dc&&(db==="yes"||db==="1");if(cK){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cQ=true};this.addListener=function(dc,db){an(dc,db)};this.enableLinkTracking=function(dc){c2=true;var db=this;cc(function(){q(function(){by(dc,db)})})};this.enableJSErrorTracking=function(){if(cM){return}cM=true;var db=T.onerror;T.onerror=function(dg,de,dd,df,dc){cc(function(){var dh="JavaScript Errors"; var di=de+":"+dd;if(df){di+=":"+df}ap(dh,di,dg)});if(db){return db(dg,de,dd,df,dc)}return false}};this.disablePerformanceTracking=function(){aY=false};this.setGenerationTimeMs=function(db){ci=parseInt(db,10)};this.enableHeartBeatTimer=function(db){db=Math.max(db,1);a1=(db||15)*1000;if(cS!==null){c8()}};this.disableHeartBeatTimer=function(){bF();if(a1||aK){if(T.removeEventListener){T.removeEventListener("focus",a6,true);T.removeEventListener("blur",av,true)}else{if(T.detachEvent){T.detachEvent("onfocus",a6);T.detachEvent("onblur",av)}}}a1=null;aK=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(db){if(T.location.protocol==="file:"){T.location=db}};this.setCountPreRendered=function(db){ba=db};this.trackGoal=function(db,de,dd,dc){cc(function(){cN(db,de,dd,dc)})};this.trackLink=function(dc,db,de,dd){cc(function(){cV(dc,db,de,dd)})};this.getNumTrackedPageViews=function(){return cn};this.trackPageView=function(db,dd,dc){b5=[]; cE=[];if(N(b1)){cc(function(){Y(aA,bC,b1)})}else{cc(function(){cn++;bV(db,dd,dc)})}};this.trackAllContentImpressions=function(){if(N(b1)){return}cc(function(){q(function(){var db=v.findContentNodes();var dc=cu(db);c7(dc,bE)})})};this.trackVisibleContentImpressions=function(db,dc){if(N(b1)){return}if(!J(db)){db=true}if(!J(dc)){dc=750}aO(db,dc,this);cc(function(){n(function(){var dd=v.findContentNodes();var de=a5(dd);c7(de,bE)})})};this.trackContentImpression=function(dd,db,dc){if(N(b1)){return}dd=a(dd);db=a(db);dc=a(dc);if(!dd){return}db=db||"Unknown";cc(function(){var de=aC(dd,db,dc);bA(de,bE)})};this.trackContentImpressionsWithinNode=function(db){if(N(b1)||!db){return}cc(function(){if(ca){n(function(){var dc=v.findContentNodesWithinNode(db);var dd=a5(dc);c7(dd,bE)})}else{q(function(){var dc=v.findContentNodesWithinNode(db);var dd=cu(dc);c7(dd,bE)})}})};this.trackContentInteraction=function(dd,de,db,dc){if(N(b1)){return}dd=a(dd);de=a(de);db=a(db);dc=a(dc);if(!dd||!de){return}db=db||"Unknown"; -cc(function(){var df=aL(dd,de,db,dc);bA(df,bE)})};this.trackContentInteractionNode=function(dc,db){if(N(b1)||!dc){return}cc(function(){var dd=c4(dc,db);bA(dd,bE)})};this.logAllContentBlocksOnPage=function(){var dd=v.findContentNodes();var db=v.collectContent(dd);var dc=typeof console;if(dc!=="undefined"&&console&&console.log){console.log(db)}};this.trackEvent=function(dc,de,db,dd,dg,df){cc(function(){ap(dc,de,db,dd,dg,df)})};this.trackSiteSearch=function(db,dd,dc,de){cc(function(){b3(db,dd,dc,de)})};this.setEcommerceView=function(de,db,dd,dc){if(!J(dd)||!dd.length){dd=""}else{if(dd instanceof Array){dd=JSON_PIWIK.stringify(dd)}}bR[5]=["_pkc",dd];if(J(dc)&&String(dc).length){bR[2]=["_pkp",dc]}if((!J(de)||!de.length)&&(!J(db)||!db.length)){return}if(J(de)&&de.length){bR[3]=["_pks",de]}if(!J(db)||!db.length){db=""}bR[4]=["_pkn",db]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(cU))};this.addEcommerceItem=function(df,db,dd,dc,de){if(df.length){cU[df]=[df,db,dd,dc,de]}}; -this.removeEcommerceItem=function(db){if(db.length){delete cU[db]}};this.clearEcommerceCart=function(){cU={}};this.trackEcommerceOrder=function(db,df,de,dd,dc,dg){bU(db,df,de,dd,dc,dg)};this.trackEcommerceCartUpdate=function(db){bn(db)};this.trackRequest=function(dc,de,dd,db){cc(function(){var df=co(dc,de,db);bA(df,bE,dd)})};this.disableQueueRequest=function(){bx.enabled=false};this.queueRequest=function(db){cc(function(){var dc=co(db);bx.push(dc)})};this.getRememberedConsent=function(){var db=az(a9);if(az(cG)){if(db){bT(a9,bk,cR)}return null}if(!db||db===0){return null}return db};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cv=true;bw=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bw){aB()}}}};this.setConsentGiven=function(){bw=true;bT(cG,bk,cR);var dc,db;for(dc=0;dc1&&am!=="addTracker"){ah("The method "+am+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}ar[am]++ }}}}return aq}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ab(al,an){var am=new Q(al,an);I.push(am);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){ad(_paq[E])}}_paq=new H();e.trigger("TrackerAdded",[am]);return am}ak(T,"beforeunload",af,false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ao,an,am,al){var ap=typeof al;if(ap==="undefined"){al=false}ak(ao,an,am,al)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(am,al){if(!y[am]){y[am]=[]}y[am].push(al)},off:function(an,am){if(!y[an]){return}var al=0;for(al;al0){dc+="&"}else{dc+="?"}var dd=bm();dc=F(dc,ar,dd);ac.setAnyAttribute(db,"href",dc)}function ax(de){var df=ac.getAttributeValueFromNode(de,"href");if(!df){return false}df=String(df);var dc=df.indexOf("//")===0||df.indexOf("http://")===0||df.indexOf("https://")===0;if(!dc){return false}var db=de.pathname||cg(de.href);var dd=(de.hostname||d(de.href)).toLowerCase();if(ao(dd,db)){if(!cB(cO,L(dd))){return true}return false}return false}function cA(db){var dc=c5(db);if(dc&&dc.type){dc.href=p(dc.href);cV(dc.href,dc.type,undefined,null,db);return}if(cH){db=aq(db);if(ax(db)){ce(db)}}}function cr(){return G.all&&!G.addEventListener}function cP(db){var dd=db.which;var dc=(typeof db.button);if(!dd&&dc!=="undefined"){if(cr()){if(db.button&1){dd=1}else{if(db.button&2){dd=3}else{if(db.button&4){dd=2}}}}else{if(db.button===0||db.button==="0"){dd=1}else{if(db.button&1){dd=2}else{if(db.button&2){dd=3}}}}}return dd}function bO(db){switch(cP(db)){case 1:return"left"; @@ -67,8 +67,8 @@ if(db>0){if(!J(dc)){dc=""}if(!w(dc)){dc=String(dc)}bh[db]=dc}};this.getCustomDim if(db===0){return null}return db};this.setCookiePath=function(db){bk=db;bd()};this.getCookiePath=function(db){return bk};this.setVisitorCookieTimeout=function(db){cD=db*1000};this.setSessionCookieTimeout=function(db){ck=db*1000};this.getSessionCookieTimeout=function(){return ck};this.setReferralCookieTimeout=function(db){cZ=db*1000};this.setConversionAttributionFirstReferrer=function(db){bq=db};this.setSecureCookie=function(db){bN=db};this.disableCookies=function(){bg=true;c1.cookie="0";if(b1){aB()}};this.deleteCookies=function(){aB()};this.setDoNotTrack=function(dc){var db=h.doNotTrack||h.msDoNotTrack;cK=dc&&(db==="yes"||db==="1");if(cK){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cQ=true};this.addListener=function(dc,db){an(dc,db)};this.enableLinkTracking=function(dc){c2=true;var db=this;cc(function(){q(function(){by(dc,db)})})};this.enableJSErrorTracking=function(){if(cM){return}cM=true;var db=T.onerror;T.onerror=function(dg,de,dd,df,dc){cc(function(){var dh="JavaScript Errors"; var di=de+":"+dd;if(df){di+=":"+df}ap(dh,di,dg)});if(db){return db(dg,de,dd,df,dc)}return false}};this.disablePerformanceTracking=function(){aY=false};this.setGenerationTimeMs=function(db){ci=parseInt(db,10)};this.enableHeartBeatTimer=function(db){db=Math.max(db,1);a1=(db||15)*1000;if(cS!==null){c8()}};this.disableHeartBeatTimer=function(){bF();if(a1||aK){if(T.removeEventListener){T.removeEventListener("focus",a6,true);T.removeEventListener("blur",av,true)}else{if(T.detachEvent){T.detachEvent("onfocus",a6);T.detachEvent("onblur",av)}}}a1=null;aK=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(db){if(T.location.protocol==="file:"){T.location=db}};this.setCountPreRendered=function(db){ba=db};this.trackGoal=function(db,de,dd,dc){cc(function(){cN(db,de,dd,dc)})};this.trackLink=function(dc,db,de,dd){cc(function(){cV(dc,db,de,dd)})};this.getNumTrackedPageViews=function(){return cn};this.trackPageView=function(db,dd,dc){b5=[]; cE=[];if(N(b1)){cc(function(){Y(aA,bC,b1)})}else{cc(function(){cn++;bV(db,dd,dc)})}};this.trackAllContentImpressions=function(){if(N(b1)){return}cc(function(){q(function(){var db=v.findContentNodes();var dc=cu(db);c7(dc,bE)})})};this.trackVisibleContentImpressions=function(db,dc){if(N(b1)){return}if(!J(db)){db=true}if(!J(dc)){dc=750}aO(db,dc,this);cc(function(){n(function(){var dd=v.findContentNodes();var de=a5(dd);c7(de,bE)})})};this.trackContentImpression=function(dd,db,dc){if(N(b1)){return}dd=a(dd);db=a(db);dc=a(dc);if(!dd){return}db=db||"Unknown";cc(function(){var de=aC(dd,db,dc);bA(de,bE)})};this.trackContentImpressionsWithinNode=function(db){if(N(b1)||!db){return}cc(function(){if(ca){n(function(){var dc=v.findContentNodesWithinNode(db);var dd=a5(dc);c7(dd,bE)})}else{q(function(){var dc=v.findContentNodesWithinNode(db);var dd=cu(dc);c7(dd,bE)})}})};this.trackContentInteraction=function(dd,de,db,dc){if(N(b1)){return}dd=a(dd);de=a(de);db=a(db);dc=a(dc);if(!dd||!de){return}db=db||"Unknown"; -cc(function(){var df=aL(dd,de,db,dc);bA(df,bE)})};this.trackContentInteractionNode=function(dc,db){if(N(b1)||!dc){return}cc(function(){var dd=c4(dc,db);bA(dd,bE)})};this.logAllContentBlocksOnPage=function(){var dd=v.findContentNodes();var db=v.collectContent(dd);var dc=typeof console;if(dc!=="undefined"&&console&&console.log){console.log(db)}};this.trackEvent=function(dc,de,db,dd,dg,df){cc(function(){ap(dc,de,db,dd,dg,df)})};this.trackSiteSearch=function(db,dd,dc,de){cc(function(){b3(db,dd,dc,de)})};this.setEcommerceView=function(de,db,dd,dc){if(!J(dd)||!dd.length){dd=""}else{if(dd instanceof Array){dd=JSON_PIWIK.stringify(dd)}}bR[5]=["_pkc",dd];if(J(dc)&&String(dc).length){bR[2]=["_pkp",dc]}if((!J(de)||!de.length)&&(!J(db)||!db.length)){return}if(J(de)&&de.length){bR[3]=["_pks",de]}if(!J(db)||!db.length){db=""}bR[4]=["_pkn",db]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(cU))};this.addEcommerceItem=function(df,db,dd,dc,de){if(df.length){cU[df]=[df,db,dd,dc,de]}}; -this.removeEcommerceItem=function(db){if(db.length){delete cU[db]}};this.clearEcommerceCart=function(){cU={}};this.trackEcommerceOrder=function(db,df,de,dd,dc,dg){bU(db,df,de,dd,dc,dg)};this.trackEcommerceCartUpdate=function(db){bn(db)};this.trackRequest=function(dc,de,dd,db){cc(function(){var df=co(dc,de,db);bA(df,bE,dd)})};this.disableQueueRequest=function(){bx.enabled=false};this.queueRequest=function(db){cc(function(){var dc=co(db);bx.push(dc)})};this.getRememberedConsent=function(){var db=az(a9);if(az(cG)){if(db){bT(a9,bk,cR)}return null}if(!db||db===0){return null}return db};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cv=true;bw=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bw){aB()}}}};this.setConsentGiven=function(){bw=true;bT(cG,bk,cR);var dc,db;for(dc=0;dc1&&am!=="addTracker"){ah("The method "+am+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}ar[am]++ }}}}return aq}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ab(al,an){var am=new Q(al,an);I.push(am);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){ad(_paq[E])}}_paq=new H();e.trigger("TrackerAdded",[am]);return am}ak(T,"beforeunload",af,false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ao,an,am,al){var ap=typeof al;if(ap==="undefined"){al=false}ak(ao,an,am,al)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(am,al){if(!y[am]){y[am]=[]}y[am].push(al)},off:function(an,am){if(!y[an]){return}var al=0;for(al;al0){dc+="&"}else{dc+="?"}var dd=bm();dc=F(dc,ar,dd);ac.setAnyAttribute(db,"href",dc)}function ax(de){var df=ac.getAttributeValueFromNode(de,"href");if(!df){return false}df=String(df);var dc=df.indexOf("//")===0||df.indexOf("http://")===0||df.indexOf("https://")===0;if(!dc){return false}var db=de.pathname||cg(de.href);var dd=(de.hostname||d(de.href)).toLowerCase();if(ao(dd,db)){if(!cB(cO,L(dd))){return true}return false}return false}function cA(db){var dc=c5(db);if(dc&&dc.type){dc.href=p(dc.href);cV(dc.href,dc.type,undefined,null,db);return}if(cH){db=aq(db);if(ax(db)){ce(db)}}}function cr(){return G.all&&!G.addEventListener}function cP(db){var dd=db.which;var dc=(typeof db.button);if(!dd&&dc!=="undefined"){if(cr()){if(db.button&1){dd=1}else{if(db.button&2){dd=3}else{if(db.button&4){dd=2}}}}else{if(db.button===0||db.button==="0"){dd=1}else{if(db.button&1){dd=2}else{if(db.button&2){dd=3}}}}}return dd}function bO(db){switch(cP(db)){case 1:return"left"; @@ -67,8 +67,8 @@ if(db>0){if(!J(dc)){dc=""}if(!w(dc)){dc=String(dc)}bh[db]=dc}};this.getCustomDim if(db===0){return null}return db};this.setCookiePath=function(db){bk=db;bd()};this.getCookiePath=function(db){return bk};this.setVisitorCookieTimeout=function(db){cD=db*1000};this.setSessionCookieTimeout=function(db){ck=db*1000};this.getSessionCookieTimeout=function(){return ck};this.setReferralCookieTimeout=function(db){cZ=db*1000};this.setConversionAttributionFirstReferrer=function(db){bq=db};this.setSecureCookie=function(db){bN=db};this.disableCookies=function(){bg=true;c1.cookie="0";if(b1){aB()}};this.deleteCookies=function(){aB()};this.setDoNotTrack=function(dc){var db=h.doNotTrack||h.msDoNotTrack;cK=dc&&(db==="yes"||db==="1");if(cK){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cQ=true};this.addListener=function(dc,db){an(dc,db)};this.enableLinkTracking=function(dc){c2=true;var db=this;cc(function(){q(function(){by(dc,db)})})};this.enableJSErrorTracking=function(){if(cM){return}cM=true;var db=T.onerror;T.onerror=function(dg,de,dd,df,dc){cc(function(){var dh="JavaScript Errors"; var di=de+":"+dd;if(df){di+=":"+df}ap(dh,di,dg)});if(db){return db(dg,de,dd,df,dc)}return false}};this.disablePerformanceTracking=function(){aY=false};this.setGenerationTimeMs=function(db){ci=parseInt(db,10)};this.enableHeartBeatTimer=function(db){db=Math.max(db,1);a1=(db||15)*1000;if(cS!==null){c8()}};this.disableHeartBeatTimer=function(){bF();if(a1||aK){if(T.removeEventListener){T.removeEventListener("focus",a6,true);T.removeEventListener("blur",av,true)}else{if(T.detachEvent){T.detachEvent("onfocus",a6);T.detachEvent("onblur",av)}}}a1=null;aK=false};this.killFrame=function(){if(T.location!==T.top.location){T.top.location=T.location}};this.redirectFile=function(db){if(T.location.protocol==="file:"){T.location=db}};this.setCountPreRendered=function(db){ba=db};this.trackGoal=function(db,de,dd,dc){cc(function(){cN(db,de,dd,dc)})};this.trackLink=function(dc,db,de,dd){cc(function(){cV(dc,db,de,dd)})};this.getNumTrackedPageViews=function(){return cn};this.trackPageView=function(db,dd,dc){b5=[]; cE=[];if(N(b1)){cc(function(){Y(aA,bC,b1)})}else{cc(function(){cn++;bV(db,dd,dc)})}};this.trackAllContentImpressions=function(){if(N(b1)){return}cc(function(){q(function(){var db=v.findContentNodes();var dc=cu(db);c7(dc,bE)})})};this.trackVisibleContentImpressions=function(db,dc){if(N(b1)){return}if(!J(db)){db=true}if(!J(dc)){dc=750}aO(db,dc,this);cc(function(){n(function(){var dd=v.findContentNodes();var de=a5(dd);c7(de,bE)})})};this.trackContentImpression=function(dd,db,dc){if(N(b1)){return}dd=a(dd);db=a(db);dc=a(dc);if(!dd){return}db=db||"Unknown";cc(function(){var de=aC(dd,db,dc);bA(de,bE)})};this.trackContentImpressionsWithinNode=function(db){if(N(b1)||!db){return}cc(function(){if(ca){n(function(){var dc=v.findContentNodesWithinNode(db);var dd=a5(dc);c7(dd,bE)})}else{q(function(){var dc=v.findContentNodesWithinNode(db);var dd=cu(dc);c7(dd,bE)})}})};this.trackContentInteraction=function(dd,de,db,dc){if(N(b1)){return}dd=a(dd);de=a(de);db=a(db);dc=a(dc);if(!dd||!de){return}db=db||"Unknown"; -cc(function(){var df=aL(dd,de,db,dc);bA(df,bE)})};this.trackContentInteractionNode=function(dc,db){if(N(b1)||!dc){return}cc(function(){var dd=c4(dc,db);bA(dd,bE)})};this.logAllContentBlocksOnPage=function(){var dd=v.findContentNodes();var db=v.collectContent(dd);var dc=typeof console;if(dc!=="undefined"&&console&&console.log){console.log(db)}};this.trackEvent=function(dc,de,db,dd,dg,df){cc(function(){ap(dc,de,db,dd,dg,df)})};this.trackSiteSearch=function(db,dd,dc,de){cc(function(){b3(db,dd,dc,de)})};this.setEcommerceView=function(de,db,dd,dc){if(!J(dd)||!dd.length){dd=""}else{if(dd instanceof Array){dd=JSON_PIWIK.stringify(dd)}}bR[5]=["_pkc",dd];if(J(dc)&&String(dc).length){bR[2]=["_pkp",dc]}if((!J(de)||!de.length)&&(!J(db)||!db.length)){return}if(J(de)&&de.length){bR[3]=["_pks",de]}if(!J(db)||!db.length){db=""}bR[4]=["_pkn",db]};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(cU))};this.addEcommerceItem=function(df,db,dd,dc,de){if(df.length){cU[df]=[df,db,dd,dc,de]}}; -this.removeEcommerceItem=function(db){if(db.length){delete cU[db]}};this.clearEcommerceCart=function(){cU={}};this.trackEcommerceOrder=function(db,df,de,dd,dc,dg){bU(db,df,de,dd,dc,dg)};this.trackEcommerceCartUpdate=function(db){bn(db)};this.trackRequest=function(dc,de,dd,db){cc(function(){var df=co(dc,de,db);bA(df,bE,dd)})};this.disableQueueRequest=function(){bx.enabled=false};this.queueRequest=function(db){cc(function(){var dc=co(db);bx.push(dc)})};this.getRememberedConsent=function(){var db=az(a9);if(az(cG)){if(db){bT(a9,bk,cR)}return null}if(!db||db===0){return null}return db};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cv=true;bw=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bw){aB()}}}};this.setConsentGiven=function(){bw=true;bT(cG,bk,cR);var dc,db;for(dc=0;dc1&&am!=="addTracker"){ah("The method "+am+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}ar[am]++ }}}}return aq}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ab(al,an){var am=new Q(al,an);I.push(am);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){ad(_paq[E])}}_paq=new H();e.trigger("TrackerAdded",[am]);return am}ak(T,"beforeunload",af,false);Date.prototype.getTimeAlias=Date.prototype.getTime;e={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ao,an,am,al){var ap=typeof al;if(ap==="undefined"){al=false}ak(ao,an,am,al)},onLoad:n,onReady:q,isNodeVisible:j,isOrWasNodeVisible:v.isNodeVisible},on:function(am,al){if(!y[am]){y[am]=[]}y[am].push(al)},off:function(an,am){if(!y[an]){return}var al=0;for(al;al