diff --git a/assets/admin/wizard.asset.php b/assets/admin/wizard.asset.php index 855949cc..795ae1f8 100644 --- a/assets/admin/wizard.asset.php +++ b/assets/admin/wizard.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '3a927fe43c2184ebd6ea'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'c9a2c63156ea6655e237'); diff --git a/assets/admin/wizard.js b/assets/admin/wizard.js index 4908fd07..12c9d0b0 100644 --- a/assets/admin/wizard.js +++ b/assets/admin/wizard.js @@ -1 +1 @@ -!function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.React,a=window.wp.element,n=window.wp.components,r=window.lodash,i=window.wp.apiFetch,l=t.n(i);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null)=>{let n={};try{n=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n.success?n.data:n};var s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave}return a};const c=(0,a.createContext)();var g,u=t=>{const[n,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1}),l=async()=>{const[t,e]=await Promise.all([o("gtmkit/v1/get-options","GET"),o("gtmkit/v1/get-site-data","GET")]),a="wizard"===window.gtmkitSettings.currentPage?await o("gtmkit/v1/get-install-data","GET"):{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let l;i[t][e]=a,l=!(0,r.isEqual)(i,n.fetchedSettings),s({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),i=!(0,r.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:i})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData};return(0,e.createElement)(c.Provider,{value:g},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var M;function N(t,e,a){void 0===a&&(a="/");let n=A(("string"==typeof e?x(e):e).pathname||"/",a);if(null==n)return null;let r=v(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),v(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:I(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of S(t.path))r(t,e,a);else r(t,e)})),e}function S(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=S(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:\w+$/,_=3,w=2,T=1,j=10,L=-2,C=t=>"*"===t;function I(t,e){let a=t.split("/"),n=a.length;return a.some(C)&&(n+=L),e&&(n+=w),a.filter((t=>!C(t))).reduce(((t,e)=>t+(b.test(e)?_:""===e?T:j)),n)}function D(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:r}=e;if("*"===n){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=r&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function z(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function A(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function U(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=x(t):(r=d({},t),h(!r.pathname||!r.pathname.includes("?"),U("?","pathname","search",r)),h(!r.pathname||!r.pathname.includes("#"),U("#","pathname","hash",r)),h(!r.search||!r.search.includes("#"),U("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(null==o)i=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t.pop();r.pathname=e.join("/")}i="/"+t.join("/")}else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?x(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:W(n),hash:Y(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const Q=["post","put","patch","delete"],F=(new Set(Q),["get",...Q]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e{n.current=!0})),e.useCallback((function(e,r){void 0===r&&(r={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},r)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:r}=e.useContext(Z),{matches:i}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(i,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void r.go(e);let i=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(i.pathname="/"===i.pathname?a:G([a,i.pathname])),(n.replace?r.replace:r.push)(i,n.state,n)}),[a,r,o,l,t])}()}function nt(t,a,n,r){q()||h(!1);let{navigator:i}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,u=tt();if(a){var d;let t="string"==typeof a?x(a):a;"/"===m||(null==(d=t.pathname)?void 0:d.startsWith(m))||h(!1),c=t}else c=u;let p=c.pathname||"/",k=N(t,{pathname:"/"===m?p:p.slice(m.length)||"/"}),f=function(t,a,n,r){var i;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(i=n)?void 0:i.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let t=0;t=0?o.slice(0,c+1):[o[0]];break}}return o.reduceRight(((t,r,i)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&r.route.id?s[r.route.id]:void 0,u=r.route.errorElement||it,m&&(c<0&&0===i?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===i&&(g=!0,d=r.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,i+1)),k=()=>{let a;return a=l?u:g?d:r.route.Component?e.createElement(r.route.Component,null):r.route.element?r.route.element:t,e.createElement(ot,{match:r,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,r);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:g.Pop}},f):f}function rt(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),r=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[r]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:r},n):null,null)}const it=e.createElement(rt,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:r}=t,i=e.useContext(H);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},r)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:r,relative:i}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===i),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:r,relative:i})),[c,u,i,n,r]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:r,navigationType:i=g.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof r&&(r=x(r));let{pathname:u="/",search:d="",hash:p="",state:k=null,key:f="default"}=r,E=e.useMemo((()=>{let t=A(u,m);return null==t?null:{location:{pathname:t,search:d,hash:p,state:k,key:f},navigationType:i}}),[m,u,d,p,k,f,i]);return null==E?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:E}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,r)=>{if(!e.isValidElement(t))return;let i=[...a,r];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,i));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,i)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;var ft=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]),new Map;const Et=e.startTransition;function yt(t){let{basename:a,children:n,future:r,window:i}=t,l=e.useRef();var o;null==l.current&&(l.current=(void 0===(o={window:i,v5Compat:!0})&&(o={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:x.location,delta:e})}function k(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:y(t);return h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(d({},l.state,{idx:m}),""));let x={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(p,u),s=t,()=>{r.removeEventListener(p,u),s=null}},createHref(t){return e(r,t)},createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=E(x.location,t,e);a&&a(n,t),m=c()+1;let u=f(n,m),d=x.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:x.location,delta:1})},replace:function(t,e){o=g.Replace;let n=E(x.location,t,e);a&&a(n,t),m=c();let r=f(n,m),u=x.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:x.location,delta:0})},go(t){return l.go(t)}};return x}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=x(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:y(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let s=l.current,[m,c]=e.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},M=e.useCallback((t=>{u&&Et?Et((()=>c(t))):c(t)}),[c,u]);return e.useLayoutEffect((()=>s.listen(M)),[s,M]),e.createElement(pt,{basename:a,children:n,location:m.location,navigationType:m.action,navigator:s,future:r})}var xt,Mt;ft.flushSync,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(xt||(xt={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Mt||(Mt={}));var Nt=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>r("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},vt=()=>{const{useImportSettings:t,useIsPending:r,useInstallData:i}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(i.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(i.import_data).forEach((t=>{d.push({value:t,label:i.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,i.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),r?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),r?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Nt,null)},St=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:r}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&r?(0,e.createElement)(vt,null):(0,e.createElement)(Nt,null))},bt=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{r("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{r("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{r("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{r("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{r("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=tt{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=ta?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},It=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(It,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const zt=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Dt,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(St,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},At=()=>(0,e.createElement)(yt,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(zt,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(At,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); \ No newline at end of file +!function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.React,a=window.wp.element,n=window.wp.components,r=window.lodash,i=window.wp.apiFetch,l=t.n(i);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let r={};try{r=await l()({path:t,method:e,...a&&{data:a}})}catch(a){return console.log(`${e} ${t} Errors:`,a),{[`gtm_kit_api_${e}_${t}_errors`]:!0}}return!0===n?r:!0===r.success?r.data:options};var s=window.wp.i18n,m=(t,e)=>{const a={...t};switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings={...e.payload.fetchedSettings,integrations:e.payload.fetchedSettings.integrations||{}},a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,e.payload.fetchedSettings.gtm_kit_api_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1,a.canSave=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors,a.notice=e.payload.fetchedSettings.gtm_kit_api_update_settings_errors?(0,s.__)("An error occurred.","gtm-kit"):(0,s.__)("Saved Successfully.","gtm-kit"),a.hasError=!!e.payload.fetchedSettings.gtm_kit_api_update_settings_errors;break;case"UPDATE_STATE":a.fetchedSettings=e.payload.fetchedSettings||a.fetchedSettings,a.stateSettings=e.payload.stateSettings||a.stateSettings,a.isPending=e.payload.isPending||a.isPending,a.notice=e.payload.notice||a.notice,a.hasError=e.payload.hasError||a.hasError,a.canSave=e.payload.canSave||a.canSave,a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData,a.supportTicket=e.payload.supportTicket||a.supportTicket;break;case"SEND_SUPPORT_DATA_BEFORE":a.isSendingSystemData=e.payload.isSendingSystemData||a.isSendingSystemData;break;case"SEND_SUPPORT_DATA":a.isSendingSystemData=!1,a.isSystemDataSent=e.payload.isSystemDataSent||a.isSystemDataSent,a.systemDataMessage=e.payload.systemDataMessage||a.systemDataMessage}return a};const c=(0,a.createContext)();var g,u=t=>{const[n,i]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const[t,e]=await Promise.all([o("gtmkit/v1/get-options","GET"),o("gtmkit/v1/get-site-data","GET")]),a="wizard"===window.gtmkitSettings.currentPage?await o("gtmkit/v1/get-install-data","GET"):{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let l;i[t][e]=a,l=!(0,r.isEqual)(i,n.fetchedSettings),s({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let i;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),i=!(0,r.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:i})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{i({type:"SEND_SUPPORT_DATA_BEFORE",payload:{isSendingSystemData:!0}});const t=await(e=n.supportTicket,o("gtmkit/v1/send-support-data","POST",e,!0));var e;i({type:"SEND_SUPPORT_DATA",payload:{isSendingSystemData:!1,isSystemDataSent:t.success,systemDataMessage:t.data}})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData,useIsSending:n.isSendingSystemData,useSupportTicket:n.supportTicket,useIsSystemDataSent:n.isSystemDataSent,useSystemDataMessage:n.systemDataMessage};return(0,e.createElement)(c.Provider,{value:g},t.children)};function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var x;function M(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let r=N(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(h(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=G([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),N(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:C(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of v(t.path))r(t,e,a);else r(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const _=/^:\w+$/,b=3,w=2,T=1,j=10,L=-2,D=t=>"*"===t;function C(t,e){let a=t.split("/"),n=a.length;return a.some(D)&&(n+=L),e&&(n+=w),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?b:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:r}=e;if("*"===n){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=r&&!s?void 0:function(t,e){try{return decodeURIComponent(t)}catch(a){return k(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(s||"",n),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return k(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function z(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function P(t,e){let a=function(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}(t);return e?a.map(((e,a)=>a===t.length-1?e.pathname:e.pathnameBase)):a.map((t=>t.pathnameBase))}function R(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=S(t):(r=d({},t),h(!r.pathname||!r.pathname.includes("?"),z("?","pathname","search",r)),h(!r.pathname||!r.pathname.includes("#"),z("#","pathname","hash",r)),h(!r.search||!r.search.includes("#"),z("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(null==o)i=a;else if(n){let t=0===e.length?[]:e[e.length-1].replace(/^\//,"").split("/");if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t.pop();r.pathname=e.join("/")}i="/"+t.join("/")}else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?S(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:W(n),hash:Y(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const G=t=>t.join("/").replace(/\/\/+/g,"/"),B=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),W=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Y=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],Q=(new Set(F),["get",...F]);function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e{n.current=!0})),e.useCallback((function(e,r){void 0===r&&(r={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},r)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:r}=e.useContext(Z),{matches:i}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(i,n.v7_relativeSplatPath)),s=e.useRef(!1);return et((()=>{s.current=!0})),e.useCallback((function(e,n){if(void 0===n&&(n={}),!s.current)return;if("number"==typeof e)return void r.go(e);let i=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(i.pathname="/"===i.pathname?a:G([a,i.pathname])),(n.replace?r.replace:r.push)(i,n.state,n)}),[a,r,o,l,t])}()}function nt(t,a,n,r){q()||h(!1);let{navigator:i}=e.useContext(Z),{matches:l}=e.useContext(V),o=l[l.length-1],s=o?o.params:{},m=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let c,u=tt();if(a){var d;let t="string"==typeof a?S(a):a;"/"===m||(null==(d=t.pathname)?void 0:d.startsWith(m))||h(!1),c=t}else c=u;let p=c.pathname||"/",k=M(t,{pathname:"/"===m?p:p.slice(m.length)||"/"}),y=function(t,a,n,r){var i;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(i=n)?void 0:i.errors;if(null!=s){let t=o.findIndex((t=>t.route.id&&(null==s?void 0:s[t.route.id])));t>=0||h(!1),o=o.slice(0,Math.min(o.length,t+1))}let m=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let t=0;t=0?o.slice(0,c+1):[o[0]];break}}return o.reduceRight(((t,r,i)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&r.route.id?s[r.route.id]:void 0,u=r.route.errorElement||it,m&&(c<0&&0===i?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===i&&(g=!0,d=r.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,i+1)),k=()=>{let a;return a=l?u:g?d:r.route.Component?e.createElement(r.route.Component,null):r.route.element?r.route.element:t,e.createElement(ot,{match:r,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(k&&k.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,i.encodeLocation?i.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,i.encodeLocation?i.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,r);return a&&y?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:g.Pop}},y):y}function rt(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),r=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[r]}(),a=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:r},n):null,null)}const it=e.createElement(rt,null);class lt extends e.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:void 0!==t.error?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return void 0!==this.state.error?e.createElement(V.Provider,{value:this.props.routeContext},e.createElement(X.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(t){let{routeContext:a,match:n,children:r}=t,i=e.useContext(H);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},r)}var st=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(st||{}),mt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(mt||{});function ct(t){let a=function(t){let a=e.useContext(V);return a||h(!1),a}(),n=a.matches[a.matches.length-1];return n.route.id||h(!1),n.route.id}const gt={};function ut(t){let{to:a,replace:n,state:r,relative:i}=t;q()||h(!1);let{future:l,static:o}=e.useContext(Z),{matches:s}=e.useContext(V),{pathname:m}=tt(),c=at(),g=R(a,P(s,l.v7_relativeSplatPath),m,"path"===i),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:r,relative:i})),[c,u,i,n,r]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:r,navigationType:i=g.Pop,navigator:l,static:o=!1,future:s}=t;q()&&h(!1);let m=a.replace(/^\/*/,"/"),c=e.useMemo((()=>({basename:m,navigator:l,static:o,future:J({v7_relativeSplatPath:!1},s)})),[m,s,l,o]);"string"==typeof r&&(r=S(r));let{pathname:u="/",search:d="",hash:p="",state:k=null,key:y="default"}=r,f=e.useMemo((()=>{let t=U(u,m);return null==t?null:{location:{pathname:t,search:d,hash:p,state:k,key:y},navigationType:i}}),[m,u,d,p,k,y,i]);return null==f?null:e.createElement(Z.Provider,{value:c},e.createElement(K.Provider,{children:n,value:f}))}function ht(t){let{children:e,location:a}=t;return nt(kt(e),a)}function kt(t,a){void 0===a&&(a=[]);let n=[];return e.Children.forEach(t,((t,r)=>{if(!e.isValidElement(t))return;let i=[...a,r];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,i));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=kt(t.props.children,i)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;var yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]),new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:r,window:i}=t,l=e.useRef();null==l.current&&(l.current=function(t){return void 0===t&&(t={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:S.location,delta:e})}function k(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:E(t);return h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(d({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(p,u),s=t,()=>{r.removeEventListener(p,u),s=null}},createHref(t){return e(r,t)},createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let u=y(n,m),d=S.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=g.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let r=y(n,m),u=S.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:S.location,delta:0})},go(t){return l.go(t)}};return S}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:E(e))}),(function(t,e){k("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),t)}({window:i,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(u)),[o,u]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}var St,xt;yt.flushSync,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"}(St||(St={})),function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));var Mt=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l}=(0,a.useContext)(c),o=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(n.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>r("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),o("/essential-settings",{replace:!0})},disabled:l||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:r,useInstallData:i}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(i.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(i.import_data).forEach((t=>{d.push({value:t,label:i.import_data[t].name})})),l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(n.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:g,options:d,onChange:t=>u(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(g,i.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),r?(0,e.createElement)(n.Spinner,null):""),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),r?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:r}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),n&&r?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l,useInstallData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{r("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),o.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{r("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,o.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{r("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,o.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{r("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>{const{useSettings:t,useUpdateStateSettings:r,useUpdateSettings:i,useIsPending:l,useSiteData:o}=(0,a.useContext)(c),m=at();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},o.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(n.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(n.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{r("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{i(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const Tt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=tt{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=ta?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(Lt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=Tt.length-1+Tt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Ot=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const At=()=>{const{useSettings:t}=(0,a.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(wt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Ot,null)):(0,e.createElement)(n.Spinner,{className:"gtm-kit-settings-page-loader"})},Ut=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(At,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,a.render)((0,e.createElement)(Ut,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); \ No newline at end of file diff --git a/gtm-kit.php b/gtm-kit.php index f8baac24..a93fc2fe 100644 --- a/gtm-kit.php +++ b/gtm-kit.php @@ -3,7 +3,7 @@ * GTM Kit Plugin * * Plugin Name: GTM Kit - * Version: 1.17.2 + * Version: 1.18 * Plugin URI: https://gtmkit.com/ * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. * Author: TLA Media @@ -27,7 +27,7 @@ exit(); } -const GTMKIT_VERSION = '1.17.2'; +const GTMKIT_VERSION = '1.18'; if ( ! defined( 'GTMKIT_FILE' ) ) { define( 'GTMKIT_FILE', __FILE__ ); diff --git a/languages/gtm-kit.pot b/languages/gtm-kit.pot index e7b8f937..4a1a7eef 100644 --- a/languages/gtm-kit.pot +++ b/languages/gtm-kit.pot @@ -2,22 +2,21 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: GTM Kit 1.17.2\n" +"Project-Id-Version: GTM Kit 1.18\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2023-12-13T06:41:32+00:00\n" +"POT-Creation-Date: 2023-12-30T11:07:06+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.9.0\n" "X-Domain: gtm-kit\n" #. Plugin Name of the plugin #: src/Admin/MetaBox.php:64 -#: assets/admin/wizard.js:4500 -#: assets/admin/wizard.js:4407 +#: assets/admin/wizard.js:1 msgid "GTM Kit" msgstr "" @@ -42,8 +41,7 @@ msgid "Go to GTM Kit Settings page" msgstr "" #: inc/main.php:80 -#: assets/admin/settings.js:6318 -#: assets/admin/settings.js:6747 +#: assets/admin/settings.js:1 msgid "Settings" msgstr "" @@ -68,9 +66,17 @@ msgstr "" msgid "Only authenticated users can access endpoint." msgstr "" +#: src/Admin/AdminAPI.php:188 +#: src/Admin/AdminAPI.php:193 +msgid "The support ticket was not found. Please check that you have entered the correct ticket." +msgstr "" + +#: src/Admin/AdminAPI.php:190 +msgid "Thank you! We have received the data." +msgstr "" + #: src/Admin/GeneralOptionsPage.php:67 -#: assets/admin/settings.js:5531 -#: assets/admin/settings.js:5609 +#: assets/admin/settings.js:1 msgid "General" msgstr "" @@ -80,25 +86,13 @@ msgstr "" #: src/Admin/HelpOptionsPage.php:44 #: src/Admin/HelpOptionsPage.php:53 -#: assets/admin/settings.js:5677 -#: assets/admin/settings.js:6308 -#: assets/admin/settings.js:6553 -#: assets/admin/settings.js:5852 -#: assets/admin/settings.js:6739 -#: assets/admin/settings.js:6975 +#: assets/admin/settings.js:1 msgid "Help" msgstr "" #: src/Admin/IntegrationsOptionsPage.php:44 #: src/Admin/IntegrationsOptionsPage.php:53 -#: assets/admin/settings.js:5558 -#: assets/admin/settings.js:5742 -#: assets/admin/settings.js:6307 -#: assets/admin/settings.js:6540 -#: assets/admin/settings.js:5695 -#: assets/admin/settings.js:5959 -#: assets/admin/settings.js:6738 -#: assets/admin/settings.js:6956 +#: assets/admin/settings.js:1 msgid "Integrations" msgstr "" @@ -107,10 +101,8 @@ msgid "Set page type in datalayer:" msgstr "" #: src/Admin/MetaBox.php:90 -#: assets/admin/settings.js:5838 -#: assets/admin/wizard.js:4708 -#: assets/admin/settings.js:6072 -#: assets/admin/wizard.js:4655 +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 msgid "Page type" msgstr "" @@ -119,59 +111,53 @@ msgstr "" msgid "%1$sNote:%2$s This will only be applied if page type has been activated in the global settings of GTM Kit." msgstr "" -#: src/Common/Util.php:94 +#: src/Common/Util.php:102 msgid "Server type:" msgstr "" -#: src/Common/Util.php:99 +#: src/Common/Util.php:107 msgid "PHP version number:" msgstr "" -#: src/Common/Util.php:104 +#: src/Common/Util.php:112 msgid "WordPress version number:" msgstr "" -#: src/Common/Util.php:109 +#: src/Common/Util.php:117 msgid "WordPress multisite:" msgstr "" -#: src/Common/Util.php:110 -#: assets/admin/wizard.js:4569 -#: assets/admin/wizard.js:4917 -#: assets/admin/wizard.js:4486 -#: assets/admin/wizard.js:5016 +#: src/Common/Util.php:118 +#: assets/admin/wizard.js:1 msgid "Yes" msgstr "" -#: src/Common/Util.php:110 -#: assets/admin/wizard.js:4577 -#: assets/admin/wizard.js:4917 -#: assets/admin/wizard.js:4499 -#: assets/admin/wizard.js:5017 +#: src/Common/Util.php:118 +#: assets/admin/wizard.js:1 msgid "No" msgstr "" -#: src/Common/Util.php:114 +#: src/Common/Util.php:122 msgid "Current theme:" msgstr "" -#: src/Common/Util.php:119 +#: src/Common/Util.php:127 msgid "Current site language:" msgstr "" -#: src/Common/Util.php:124 +#: src/Common/Util.php:132 msgid "Active plugins:" msgstr "" -#: src/Common/Util.php:125 +#: src/Common/Util.php:133 msgid "Plugin name and version of all active plugins" msgstr "" -#: src/Common/Util.php:129 +#: src/Common/Util.php:137 msgid "Anonymized GTM Kit settings:" msgstr "" -#: src/Common/Util.php:130 +#: src/Common/Util.php:138 msgid "Which GTM Kit settings are active" msgstr "" @@ -236,1389 +222,1060 @@ msgstr "" msgid "GTM Kit data." msgstr "" -#: assets/admin/settings.js:4343 -#: assets/admin/settings.js:4281 -msgid "Active" +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 +msgid "An error occurred." msgstr "" -#: assets/admin/settings.js:4343 -#: assets/admin/settings.js:4281 -msgid "Inactive" +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 +msgid "Saved Successfully." msgstr "" -#: assets/admin/settings.js:4424 -#: assets/admin/settings.js:4333 +#: assets/admin/settings.js:1 msgid "Save" msgstr "" -#: assets/admin/settings.js:4437 -#: assets/admin/settings.js:4346 +#: assets/admin/settings.js:1 msgid "Saved" msgstr "" -#: assets/admin/settings.js:4483 -#: assets/admin/settings.js:4375 -msgid "(not set)" +#: assets/admin/settings.js:1 +msgid "Active" msgstr "" -#: assets/admin/settings.js:4626 -#: assets/admin/settings.js:4492 -msgid "%s Integration" +#: assets/admin/settings.js:1 +msgid "Inactive" msgstr "" -#: assets/admin/settings.js:4628 -#: assets/admin/settings.js:4498 -msgid "Track %s" +#: assets/admin/settings.js:1 +msgid "Read article" msgstr "" -#: assets/admin/settings.js:4629 -#: assets/admin/settings.js:4500 -msgid "Activate the %s integration" +#: assets/admin/settings.js:1 +msgid "The #1 open source eCommerce platform built for WordPress" msgstr "" -#: assets/admin/settings.js:4689 -#: assets/admin/settings.js:4563 -msgid "Read article" +#: assets/admin/settings.js:1 +msgid "Setup integration" msgstr "" -#: assets/admin/settings.js:4878 -#: assets/admin/settings.js:4735 -msgid "%s is not active" +#: assets/admin/settings.js:1 +msgid "Just another contact form plugin for WordPress. Simple but flexible" msgstr "" -#: assets/admin/settings.js:4882 -#: assets/admin/settings.js:4743 -msgid "If you haven't installed and activated %s you must do that." +#: assets/admin/settings.js:1 +msgid "Easy way to sell Digital Products With WordPress" msgstr "" -#: assets/admin/settings.js:4888 -#: assets/admin/settings.js:4758 -msgid "Install %s" +#: assets/admin/settings.js:1 +msgid "How to get the most out of Google Tag Manager with GTM Kit." msgstr "" -#: assets/admin/settings.js:5110 -#: assets/admin/wizard.js:4887 -#: assets/admin/settings.js:4944 -#: assets/admin/wizard.js:4965 -msgid "GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations." +#: assets/admin/settings.js:1 +msgid "WooCommerce integration" msgstr "" -#: assets/admin/settings.js:5112 -#: assets/admin/wizard.js:4889 -#: assets/admin/settings.js:4950 -#: assets/admin/wizard.js:4971 -msgid "You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:" +#: assets/admin/settings.js:1 +msgid "Integrate WooCommerce with Google Tag Manager and Google Analytics." msgstr "" -#: assets/admin/settings.js:5168 -#: assets/admin/settings.js:4997 -msgid "Contact Form 7" +#: assets/admin/settings.js:1 +msgid "Integrate Contact Form 7 with Google Tag Manager and Google Analytics." msgstr "" -#: assets/admin/settings.js:5177 -#: assets/admin/settings.js:5423 -#: assets/admin/settings.js:5012 -#: assets/admin/settings.js:5467 -msgid "Basic Settings" +#: assets/admin/settings.js:1 +msgid "Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics." msgstr "" -#: assets/admin/settings.js:5179 -#: assets/admin/settings.js:5016 -msgid "Load JavaScript" +#: assets/admin/settings.js:1 +msgid "Customization of the GTM container implementation and Server Side Tracking." msgstr "" -#: assets/admin/settings.js:5181 -#: assets/admin/settings.js:5019 -msgid "Only on pages where where the Contact Form 7 script is registered (recommended)." +#: assets/admin/settings.js:1 +msgid "One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php." msgstr "" -#: assets/admin/settings.js:5184 -#: assets/admin/settings.js:5026 -msgid "On all pages" +#: assets/admin/settings.js:1 +msgid "See all tutorials…" msgstr "" -#: assets/admin/settings.js:5187 -#: assets/admin/settings.js:5030 -msgid "Where do you want load the JavaScript?" +#: assets/admin/settings.js:1 +msgid "See all our tutorial and get the most out of GTM Kit" +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Read articles" +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Container ID:" msgstr "" -#: assets/admin/settings.js:5234 -#: assets/admin/settings.js:5069 +#: assets/admin/settings.js:1 +msgid "The container is not active but the datalayer is generated." +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Edit container" +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Server-side GTM" +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility." +msgstr "" + +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 +msgid "Help improve GTM Kit" +msgstr "" + +#: assets/admin/settings.js:1 +msgid "Share anonymous data with the development team to help improve GTM Kit." +msgstr "" + +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 +msgid "Share anonymous data" +msgstr "" + +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 +msgid "Tutorials" +msgstr "" + +#: assets/admin/settings.js:1 msgid "Google Tag Manager container" msgstr "" -#: assets/admin/settings.js:5235 -#: assets/admin/settings.js:5074 +#: assets/admin/settings.js:1 msgid "General Container Settings" msgstr "" -#: assets/admin/settings.js:5238 -#: assets/admin/wizard.js:5011 -#: assets/admin/settings.js:5078 -#: assets/admin/wizard.js:5131 +#: assets/admin/settings.js:1 +#: assets/admin/wizard.js:1 msgid "To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container." msgstr "" -#: assets/admin/settings.js:5239 -#: assets/admin/settings.js:5085 +#: assets/admin/settings.js:1 msgid "GTM Container ID:" msgstr "" -#: assets/admin/settings.js:5241 -#: assets/admin/settings.js:5087 +#: assets/admin/settings.js:1 msgid "Enter GTM Container ID" msgstr "" -#: assets/admin/settings.js:5243 -#: assets/admin/settings.js:5094 +#: assets/admin/settings.js:1 msgid "Inject Container Code" msgstr "" -#: assets/admin/settings.js:5244 -#: assets/admin/settings.js:5095 +#: assets/admin/settings.js:1 msgid "Setting this to Off will remove the Google Tag Manager container code but the data layer will remain." msgstr "" -#: assets/admin/settings.js:5247 -#: assets/admin/settings.js:5103 +#: assets/admin/settings.js:1 msgid "Just the container" msgstr "" -#: assets/admin/settings.js:5248 -#: assets/admin/settings.js:5104 +#: assets/admin/settings.js:1 msgid "Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings." msgstr "" -#: assets/admin/settings.js:5251 -#: assets/admin/settings.js:5112 +#: assets/admin/settings.js:1 msgid "dataLayer variable name:" msgstr "" -#: assets/admin/settings.js:5254 -#: assets/admin/settings.js:5115 +#: assets/admin/settings.js:1 msgid "The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do." msgstr "" -#: assets/admin/settings.js:5256 -#: assets/admin/settings.js:5125 +#: assets/admin/settings.js:1 msgid "Server-side Tagging (sGTM)" msgstr "" -#: assets/admin/settings.js:5260 -#: assets/admin/settings.js:5132 +#: assets/admin/settings.js:1 msgid "sGTM Container Domain:" msgstr "" -#: assets/admin/settings.js:5262 -#: assets/admin/settings.js:5134 +#: assets/admin/settings.js:1 msgid "Enter domain …" msgstr "" -#: assets/admin/settings.js:5263 -#: assets/admin/settings.js:5135 +#: assets/admin/settings.js:1 msgid "Enter your custom domain name if you are using a custom server side GTM container for tracking." msgstr "" -#: assets/admin/settings.js:5265 -#: assets/admin/settings.js:5142 +#: assets/admin/settings.js:1 msgid "sGTM container identifier:" msgstr "" -#: assets/admin/settings.js:5267 -#: assets/admin/settings.js:5147 +#: assets/admin/settings.js:1 msgid "Enter loader name …" msgstr "" -#: assets/admin/settings.js:5268 -#: assets/admin/settings.js:5151 +#: assets/admin/settings.js:1 msgid "Only use if you are using a custom loader." msgstr "" -#: assets/admin/settings.js:5270 -#: assets/admin/settings.js:5158 +#: assets/admin/settings.js:1 msgid "Cookie Keeper (for Stape users only)" msgstr "" -#: assets/admin/settings.js:5271 -#: assets/admin/settings.js:5162 +#: assets/admin/settings.js:1 msgid "Prolong cookie lifetime in Safari and other browsers with ITP. This only works if you use Stape sGTM hosting and have set up the Cookie Keeper power up." msgstr "" -#: assets/admin/settings.js:5280 -#: assets/admin/settings.js:5181 +#: assets/admin/settings.js:1 msgid "Google Tag Manager Server-side Tagging" msgstr "" -#: assets/admin/settings.js:5282 -#: assets/admin/settings.js:5544 -#: assets/admin/settings.js:5187 -#: assets/admin/settings.js:5654 -msgid "Server-side tagging is a silver bullet that gives you improved data accuracy, performance, privacy, and flexibility." -msgstr "" - -#: assets/admin/settings.js:5287 -#: assets/admin/settings.js:5331 -#: assets/admin/settings.js:5198 +#: assets/admin/settings.js:1 msgid "Learn more" msgstr "" -#: assets/admin/settings.js:5289 -#: assets/admin/settings.js:5206 +#: assets/admin/settings.js:1 msgid "Hosting server-side GTM containers" msgstr "" -#: assets/admin/settings.js:5291 -#: assets/admin/settings.js:5212 +#: assets/admin/settings.js:1 msgid "Setting up server-side tracking can be challenging and costly but there is an easy and cheap solution." msgstr "" -#: assets/admin/settings.js:5293 -#: assets/admin/settings.js:5218 +#: assets/admin/settings.js:1 msgid "Stape.io is a solution for hosting server-side Google Tag Manager containers, offering a simplified approach that demands less technical expertise than solutions like Google Cloud Platform." msgstr "" -#: assets/admin/settings.js:5293 -#: assets/admin/settings.js:5223 +#: assets/admin/settings.js:1 msgid "Additionally, it provides valuable add-ons for enhanced functionality." msgstr "" -#: assets/admin/settings.js:5300 -#: assets/admin/settings.js:5235 +#: assets/admin/settings.js:1 msgid "Learn more about Stape.io" msgstr "" -#: assets/admin/settings.js:5301 -#: assets/admin/settings.js:5248 +#: assets/admin/settings.js:1 msgid "Google Tag Manager Environment" msgstr "" -#: assets/admin/settings.js:5305 -#: assets/admin/settings.js:5255 +#: assets/admin/settings.js:1 msgid "gtm_auth:" msgstr "" -#: assets/admin/settings.js:5307 -#: assets/admin/settings.js:5257 +#: assets/admin/settings.js:1 msgid "Enter gtm_auth code" msgstr "" -#: assets/admin/settings.js:5308 -#: assets/admin/settings.js:5261 +#: assets/admin/settings.js:1 msgid "Enter your gtm_auth code your GTM environment." msgstr "" -#: assets/admin/settings.js:5310 -#: assets/admin/settings.js:5268 +#: assets/admin/settings.js:1 msgid "gtm_preview:" msgstr "" -#: assets/admin/settings.js:5312 -#: assets/admin/settings.js:5270 +#: assets/admin/settings.js:1 msgid "Enter gtm_preview code" msgstr "" -#: assets/admin/settings.js:5313 -#: assets/admin/settings.js:5274 +#: assets/admin/settings.js:1 msgid "Enter your gtm_preview code your GTM environment." msgstr "" -#: assets/admin/settings.js:5320 -#: assets/admin/settings.js:5291 +#: assets/admin/settings.js:1 msgid "Environments" msgstr "" -#: assets/admin/settings.js:5322 -#: assets/admin/settings.js:5294 +#: assets/admin/settings.js:1 msgid "In Google Tag Manager you can define different environments like Live, Dev and QA." msgstr "" -#: assets/admin/settings.js:5322 -#: assets/admin/settings.js:5299 +#: assets/admin/settings.js:1 msgid "To use a specific environment in GTM Kit you must enter the \"gtm_auth\" and \"gtm_preview\" codes for that environment." msgstr "" -#: assets/admin/settings.js:5322 -#: assets/admin/settings.js:5304 +#: assets/admin/settings.js:1 msgid "If left empty the default environment will be used." msgstr "" -#: assets/admin/settings.js:5324 -#: assets/admin/settings.js:5314 +#: assets/admin/settings.js:1 msgid "Override settings in wp-config.php" msgstr "" -#: assets/admin/settings.js:5326 -#: assets/admin/settings.js:5320 +#: assets/admin/settings.js:1 msgid "You can override the values of using constants in wp-config.php, which is a very useful for setting the value in your development and staging environments." msgstr "" -#: assets/admin/settings.js:5332 -#: assets/admin/settings.js:5341 +#: assets/admin/settings.js:1 msgid "Container Code Implementation" msgstr "" -#: assets/admin/settings.js:5334 -#: assets/admin/settings.js:5345 +#: assets/admin/settings.js:1 msgid "Container code implementation:" msgstr "" -#: assets/admin/settings.js:5336 -#: assets/admin/settings.js:5351 +#: assets/admin/settings.js:1 msgid "Standard implementation as recommended by Google (no delay)" msgstr "" -#: assets/admin/settings.js:5339 -#: assets/admin/settings.js:5358 +#: assets/admin/settings.js:1 msgid "Load container when browser is idle (requestIdleCallback)" msgstr "" -#: assets/admin/settings.js:5342 -#: assets/admin/settings.js:5365 +#: assets/admin/settings.js:1 msgid "Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle." msgstr "" -#: assets/admin/settings.js:5345 -#: assets/admin/settings.js:5373 +#: assets/admin/settings.js:1 msgid "Container code noscript implementation:" msgstr "" -#: assets/admin/settings.js:5347 -#: assets/admin/settings.js:5379 +#: assets/admin/settings.js:1 msgid "Just after the opening tag" msgstr "" -#: assets/admin/settings.js:5350 -#: assets/admin/settings.js:5386 +#: assets/admin/settings.js:1 msgid "Footer of the page (not recommended by Google)" msgstr "" -#: assets/admin/settings.js:5353 -#: assets/admin/settings.js:5393 +#: assets/admin/settings.js:1 msgid "Custom (insert function in your template)" msgstr "" -#: assets/admin/settings.js:5356 -#: assets/admin/settings.js:5400 +#: assets/admin/settings.js:1 msgid "Disable