23 lines
83 KiB
JavaScript
23 lines
83 KiB
JavaScript
|
|
"use strict";(globalThis.__googlesitekit_webpackJsonp=globalThis.__googlesitekit_webpackJsonp||[]).push([[995],{80:(e,t,i)=>{i.d(t,{CV:()=>T,Cu:()=>R,K9:()=>s,Kr:()=>y,Lf:()=>p,Oh:()=>n,PW:()=>k,Rx:()=>w,S9:()=>S,TQ:()=>u,Vt:()=>U,Wl:()=>_,ZC:()=>r,ZY:()=>a,_p:()=>N,ag:()=>m,aj:()=>d,bz:()=>I,dq:()=>D,f2:()=>l,fB:()=>C,fV:()=>E,iB:()=>g,kc:()=>c,mo:()=>f,nc:()=>A,rm:()=>b,to:()=>o,wo:()=>v,yn:()=>h});const s="modules/analytics-4",r="account_create",o="property_create",n="webdatastream_create",a="analyticsSetup",c=10,l=0,g="https://www.googleapis.com/auth/tagmanager.readonly",u="enhanced-measurement-form",d="enhanced-measurement-enabled",p="enhanced-measurement-should-dismiss-activation-banner",m="analyticsAccountCreate",y="analyticsCustomDimensionsCreate",S="https://www.googleapis.com/auth/analytics.edit",v="dashboardAllTrafficWidgetDimensionName",f="dashboardAllTrafficWidgetDimensionColor",h="dashboardAllTrafficWidgetDimensionValue",_="dashboardAllTrafficWidgetActiveRowIndex",b="dashboardAllTrafficWidgetLoaded",R={googlesitekit_post_date:{parameterName:"googlesitekit_post_date",displayName:"WordPress Post Date",description:"Created by Site Kit: Date when a post was published",scope:"EVENT"},googlesitekit_post_author:{parameterName:"googlesitekit_post_author",displayName:"WordPress Post Author",description:"Created by Site Kit: WordPress name of the post author",scope:"EVENT"},googlesitekit_post_categories:{parameterName:"googlesitekit_post_categories",displayName:"WordPress Post Categories",description:"Created by Site Kit: Names of categories assigned to a post",scope:"EVENT"},googlesitekit_post_type:{parameterName:"googlesitekit_post_type",displayName:"WordPress Post Type",description:"Created by Site Kit: Content type of a post",scope:"EVENT"}},A={ADD_TO_CART:"add_to_cart",PURCHASE:"purchase",SUBMIT_LEAD_FORM:"submit_lead_form",GENERATE_LEAD:"generate_lead",CONTACT:"contact"},E=[A.CONTACT,A.GENERATE_LEAD,A.SUBMIT_LEAD_FORM],C={"new-visitors":{description:"People who visited the site for the first time",displayName:"New visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"new"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:new_visitors"}}}}]}}]}}}}]},"returning-visitors":{description:"People who have visited your site at least once before",displayName:"Returning visitors",membershipDurationDays:-1,filterClauses:[{clauseType:"INCLUDE",simpleFilter:{scope:"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS",filterExpression:{andGroup:{filterExpressions:[{orGroup:{filterExpressions:[{dimensionOrMetricFilter:{fieldName:"newVsReturning",stringFilter:{matchType:"EXACT",value:"returning"}}}]}},{orGroup:{filterExpressions:[{notExpression:{dimensionOrMetricFilter:{fieldName:"groupId",stringFilter:{matchType:"EXACT",value:"created_by_googlesitekit:returning_visitors"}}}}]}}]}}}}]}},k="audiencePermissionsSetup",T="audienceTileCustomDimensionCreate",I="audience-selection-panel-expirable-new-badge-",D="audience",U="customDimension",N="property",w=[D,U,N]},4169:(e,t,i)=>{i.d(t,{N$:()=>r,aO:()=>o,qB:()=>s});const s={BOXES:"boxes",COMPOSITE:"composite"},r={QUARTER:"quarter",HALF:"half",FULL:"full"},o="core/widgets"},7144:(e,t,i)=>{i.d(t,{EA:()=>o,GF:()=>v,Hl:()=>u,IX:()=>m,Is:()=>n,KD:()=>p,LO:()=>g,NO:()=>l,Nl:()=>c,QJ:()=>d,Uf:()=>r,XU:()=>S,Y0:()=>a,hs:()=>f,wb:()=>y});var s=i(82871);const r="key-metrics-setup-cta-widget",o="googlesitekit-key-metrics-selection-panel-opened",n="key-metrics-selection-form",a="key-metrics-selected",c="key-metrics-effective-selection",l="key-metrics-unstaged-selection",g=2,u=8,d={SLUG:"current-selection",LABEL:(0,s.__)("Current selection","google-site-kit")},p={SLUG:"suggested",LABEL:(0,s.__)("Suggested","google-site-kit")},m={SLUG:"visitors",LABEL:(0
|
||
|
|
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),r?p(r,{...c,unit:"second"}):"",s?p(s,{...c,unit:"minute"}):"",i?p(i,{...c,unit:"hour"}):"").trim()},formatDecimal(){const t=(0,n.sprintf)(
|
||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
||
|
|
// translators: %s: number of seconds with "s" as the abbreviated unit.
|
||
|
|
(0,n.__)("%ds","google-site-kit"),r);if(0===e)return t;const o=(0,n.sprintf)(
|
||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
||
|
|
// translators: %s: number of minutes with "m" as the abbreviated unit.
|
||
|
|
(0,n.__)("%dm","google-site-kit"),s),a=(0,n.sprintf)(
|
||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
||
|
|
// translators: %s: number of hours with "h" as the abbreviated unit.
|
||
|
|
(0,n.__)("%dh","google-site-kit"),i);return(0,n.sprintf)(/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */ /* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
(0,n._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),r?t:"",s?o:"",i?a:"").trim()}}}(e,t);try{return i()}catch{return s()}}function c(e){e=parseInt(e,10),Number.isNaN(e)&&(e=0);return{hours:Math.floor(e/60/60),minutes:Math.floor(e/60%60),seconds:Math.floor(e%60)}}function l(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e}function g(e){let t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:(0,s.isPlainObject)(e)&&(t={...e}),t}function u(e,t={}){e=(0,s.isFinite)(e)?e:Number(e),(0,s.isFinite)(e)||(console.warn("Invalid number",e,typeof e),e=0);const i=g(t),{style:r="metric"}=i;return"metric"===r?function(e){const t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?(0,n.sprintf)(
|
||
|
|
// translators: %s: an abbreviated number in millions.
|
||
|
|
// translators: %s: an abbreviated number in millions.
|
||
|
|
(0,n.__)("%sM","google-site-kit"),p(l(e),e%10==0?{}:t)):1e4<=e?(0,n.sprintf)(
|
||
|
|
// translators: %s: an abbreviated number in thousands.
|
||
|
|
// translators: %s: an abbreviated number in thousands.
|
||
|
|
(0,n.__)("%sK","google-site-kit"),p(l(e))):1e3<=e?(0,n.sprintf)(
|
||
|
|
// translators: %s: an abbreviated number in thousands.
|
||
|
|
// translators: %s: an abbreviated number in thousands.
|
||
|
|
(0,n.__)("%sK","google-site-kit"),p(l(e),e%10==0?{}:t)):p(e,{signDisplay:"never",maximumFractionDigits:1})}(e):"duration"===r?a(e,i):"durationISO"===r?function(e){let{hours:t,minutes:i,seconds:s}=c(e);return s=("0"+s).slice(-2),i=("0"+i).slice(-2),t=("0"+t).slice(-2),"00"===t?`${i}:${s}`:`${t}:${i}:${s}`}(e):p(e,i)}const d=o()(console.warn);function p(e,t={}){const{locale:i=y(),...s}=t;try{return new Intl.NumberFormat(i,s).format(e)}catch(t){d(`Site Kit numberFormat error: Intl.NumberFormat( ${JSON.stringify(i)}, ${JSON.stringify(s)} ).format( ${typeof e} )`,t.message)}const r={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},o=["signDisplay","compactDisplay"],n={};for(const[e,t]of Object.entries(s))r[e]&&t===r[e]||o.includes(e)||(n[e]=t);try{return new Intl.NumberFormat(i,n).format(e)}catch{return new Intl.NumberFormat(i).format(e)}}function m(e,t={}){const{locale:i=y(),style:s="long",type:r="conjunction"}=t;if(Intl.ListFormat){return new Intl.ListFormat(i,{style:s,type:r}).format(e)}
|
||
|
|
/* translators: used between list items, there is a space after the comma. */const o=(0,n.__)(", ","google-site-kit");return e.join(o)}function y(e=i.g){const t=(0,s.get)(e,["_googlesitekitLegacyData","locale"]);if(t){const e=t.match(/^(\w{2})?(_)?(\w{2})/);if(e&&e[0])return e[0].replace(/_/g,"-")}return e.navigator.language}},49993:(e,t,i)=>{i.d(t,{Gq:()=>u,IL:()=>y,LD:()=>p,SO:()=>d,a2:()=>r,xD:()=>m});var s=i(13047);const r="googlesitekit_",o=`${r}1.175.0_${i.g._googlesitekitBaseData.storagePrefix}_`,n=["sessionStorage","localStorage"];let a,c=[...n];async function l(e){const t=i.g[e];if(!t)return!1;try{const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}async function g(){if(void 0!==a)return a;for(const e of c)a||await l(e)&&(a=i.g[e]);return void 0===a&&(a=null),a}async function u(e){const t=await g();if(t){const i=t.getItem(`${o}${e}`);if(i){const e=JSON.parse(i),{timestamp:t,ttl:s,value:r,isError:o}=e;if(t&&(!s||Math.round(Date.now()/1e3)-t<s))return{cacheHit:!0,value:r,isError:o}}}return{cacheHit:!1,value:void 0}}async function d(e,t,{ttl:r=s.Jg,timestamp:n=Math.round(Date.now()/1e3),isError:a=!1}={}){const c=await g();if(c)try{return c.setItem(`${o}${e}`,JSON.stringify({timestamp:n,ttl:r,value:t,isError:a})),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function p(e){const t=await g();if(t)try{const i=e.startsWith(r)?e:`${o}${e}`;return t.removeItem(i),!0}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),!1}return!1}async function m(){const e=await g();if(e)try{const t=[];for(let i=0;i<e.length;i++){const s=e.key(i);0===s.indexOf(r)&&t.push(s)}return t}catch(e){return i.g.console.warn("Encountered an unexpected storage error:",e),[]}return[]}async function y(){if(await g()){const e=await m();for(const t of e)await p(t);return!0}return!1}},50454:(e,t,i)=>{i.d(t,{G:()=>u});var s=i(82871),r=i(97345),o=i(29785),n=i(80);function a({select:e,slug:t}){return e(n.K9).hasConversionReportingEvents(this.requiredConversionEventName)||e(r.oR).isKeyMetricActive(t)}var c=i(7144);function l({select:e,isViewOnlyDashboard:t}){return!t||!(!t||!e(n.K9).getAdSenseLinked())}function g({select:e,isViewOnlyDashboard:t}){return!t||e(n.K9).hasCustomDimensions(this.requiredCustomDimensions)}const u={[r.p3]:{title:(0,s.__)("Top earning pages","google-site-kit"),description:(0,s.__)("Pages that generated the most AdSense revenue","google-site-kit"),infoTooltip:(0,s.__)("Pages that generated the most AdSense revenue","google-site-kit"),displayInSelectionPanel:l,displayInList:l,metadata:{group:c.hs.SLUG}},[r.BT]:{title:(0,s.__)("Top recent trending pages","google-site-kit"),description:(0,s.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),infoTooltip:(0,s.__)("Pages with the most pageviews published in the last 3 days","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_date"],displayInSelectionPanel:g,displayInWidgetArea:g,displayInList:g,metadata:{group:c.hs.SLUG}},[r.tB]:{title:(0,s.__)("Most popular authors by pageviews","google-site-kit"),description:(0,s.__)("Authors whose posts got the most visits","google-site-kit"),infoTooltip:(0,s.__)("Authors whose posts got the most visits","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_author"],displayInSelectionPanel:g,displayInWidgetArea:g,displayInList:g,metadata:{group:c.hs.SLUG}},[r.t1]:{title:(0,s.__)("Top categories by pageviews","google-site-kit"),description:(0,s.__)("Categories that your site visitors viewed the most","google-site-kit"),infoTooltip:(0,s.__)("Categories that your site visitors viewed the most","google-site-kit"),requiredCustomDimensions:["googlesitekit_post_categories"],displayInSelectionPanel:g,displayInWidgetArea:g,displayInList:g,metadata:{group:c.hs.SLUG}},[r.ep]:{title:(0,s.__)("Most popular content by pageviews","google-site-kit"),description:(0,s
|
||
|
|
(0,n._n)("Last %s day","Last %s days",e,"google-site-kit"),e)}return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}function y(e=""){if(!(0,o.isString)(e))return!1;if(3!==e.split("-").length)return!1;const t=new Date(e);return(0,o.isDate)(t)&&!isNaN(t)}function S(e){r()((0,o.isDate)(e)&&!isNaN(e),a);const t=`${e.getMonth()+1}`,i=`${e.getDate()}`;return[e.getFullYear(),t.length<2?`0${t}`:t,i.length<2?`0${i}`:i].join("-")}function v(e){r()(y(e),c);const[t,i,s]=e.split("-");return new Date(t,i-1,s)}function f(e,t){return S(_(e,t*d))}function h(e){const t=e.split("-");return 3===t.length&&"last"===t[0]&&!Number.isNaN(t[1])&&!Number.isNaN(parseFloat(t[1]))&&"days"===t[2]}function _(e,t){r()(y(e)||(0,o.isDate)(e)&&!isNaN(e),c);const i=y(e)?Date.parse(e):e.getTime();return new Date(i-1e3*t)}},54419:e=>{e.exports=googlesitekit.api},55465:(e,t,i)=>{i.d(t,{O:()=>r});var s=i(31234);const r=i.n(s)()(i.g)},65054:(e,t,i)=>{i.d(t,{M9:()=>E,sx:()=>R,BI:()=>A});var s=i(17243);const r="_googlesitekitDataLayer",o="data-googlesitekit-gtag";function n(e){return function(){e[r]=e[r]||[],e[r].push(arguments)}}var a=i(84895);const c={activeModules:[],isAuthenticated:!1,referenceSiteURL:"",trackingEnabled:!1,trackingID:"",userIDHash:"",userRoles:[]};const{activeModules:l=[],isSiteKitScreen:g,trackingEnabled:u,trackingID:d,referenceSiteURL:p,userIDHash:m,isAuthenticated:y,userRoles:S}=i.g._googlesitekitTrackingData||{},v={activeModules:l,trackingEnabled:u,trackingID:d,referenceSiteURL:p,userIDHash:m,isSiteKitScreen:g,userRoles:S,isAuthenticated:y,pluginVersion:"1.175.0"},{enableTracking:f,disableTracking:h,isTrackingEnabled:_,initializeSnippet:b,trackEvent:R,trackEventOnce:A}=function(e,t=i.g,l=i.g){const g={...c,...e};g.referenceSiteURL&&(g.referenceSiteURL=g.referenceSiteURL.toString().replace(/\/+$/,""));const u=function(e,t){const s=n(t);let c;const{activeModules:l,referenceSiteURL:g,userIDHash:u,userRoles:d=[],isAuthenticated:p,pluginVersion:m}=e;return function(){const{document:t}=i.g;if(void 0===c&&(c=!!t.querySelector(`script[${o}]`)),c)return!1;c=!0;const n=d?.length?d.join(","):"";s("js",new Date),s("config",e.trackingID,{groups:"site_kit",send_page_view:e.isSiteKitScreen,domain:g,plugin_version:m||"",enabled_features:Array.from(a.t).join(","),active_modules:l.join(","),authenticated:p?"1":"0",user_properties:{user_roles:n,user_identifier:u}});const y=t.createElement("script");return y.setAttribute(o,""),y.async=!0,y.src=`https://www.googletagmanager.com/gtag/js?id=${e.trackingID}&l=${r}`,t.head.appendChild(y),{scriptTagSrc:`https://www.googletagmanager.com/gtag/js?id=${e.trackingID}&l=${r}`}}}(g,t),d=function(e,t,i,s){const r=n(t);return async function(t,o,n,a){const{trackingEnabled:c}=e;if(!c)return null;i();const l={send_to:"site_kit",event_category:t,event_label:n,value:a};return new Promise(e=>{const i=setTimeout(function(){s.console.warn(`Tracking event "${o}" (category "${t}") took too long to fire.`),e()},1e3);function n(){clearTimeout(i),e()}r("event",o,{...l,event_callback:n}),s._gaUserPrefs?.ioo?.()&&n()})}}(g,t,u,l),p={};return{enableTracking:function(){g.trackingEnabled=!0},disableTracking:function(){g.trackingEnabled=!1},initializeSnippet:u,isTrackingEnabled:function(){return!!g.trackingEnabled},trackEvent:d,trackEventOnce:function(...e){const t=JSON.stringify(e);p[t]||(p[t]=(0,s.once)(d)),p[t](...e)}}}(v);function E(e){e?f():h()}g&&u&&b()},67448:(e,t,i)=>{i.d(t,{Y:()=>c});var s=i(32091),r=i.n(s),o=i(54419),n=i(50539),a=i(35812);function c(e,t,i,{server:s=!0,storeName:c}={}){r()(e,"type is required."),r()(t,"identifier is required."),r()(i,"datapoint is required.");const l=c||`${e}/${t}`,g={serverNotifications:s?void 0:{}},u=(0,a.U)({baseName:"getNotifications",controlCallback:()=>(0,o.get)(e,t,i),reducerCallback:(0,n.createReducer)((e,t)=>{e.serverNotifications=t.reduce((e,t)=>({...e,[t.id]:t}),{})})});const d={*getNotifications(){(yield n.common
|