From 7314f62535f09bfbe8ec911933f8b2ff8d39bbef Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Sat, 13 Apr 2024 15:20:23 +0200 Subject: [PATCH] Prepare release 1.21 --- assets/admin/wizard.asset.php | 2 +- assets/admin/wizard.js | 2 +- gtm-kit.php | 4 +- languages/gtm-kit.pot | 170 ++++++++++------------------------ package-lock.json | 4 +- package.json | 2 +- readme.txt | 8 +- vendor/composer/installed.php | 4 +- 8 files changed, 63 insertions(+), 133 deletions(-) diff --git a/assets/admin/wizard.asset.php b/assets/admin/wizard.asset.php index ef173b2..3f6fad6 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' => 'e7d58fb1352372f542b9'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '91263adafb49e551176e'); diff --git a/assets/admin/wizard.js b/assets/admin/wizard.js index 6c39a70..4356126 100644 --- a/assets/admin/wizard.js +++ b/assets/admin/wizard.js @@ -1 +1 @@ -(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=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?i:!0===i.success?i.data:options},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},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({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;r({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,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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 i=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)))))}(i);let r=null;for(let t=0;null==r&&t{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,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))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&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=/^:\w+$/,_=3,b=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+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(w.test(e)?_:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!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:r,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 i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),z("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),z("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),z("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=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();i.pathname=e.join("/")}r="/"+t.join("/")}else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:W(n),hash:Y(i)}}(i,r),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,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,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 i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=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,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=M(t,{pathname:"/"===m?p:p.slice(m.length)||"/"}),y=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.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&&i&&i.v7_partialHydration)for(let t=0;t=0?o.slice(0,c+1):[o[0]];break}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?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,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&y?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},y):y}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),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,i={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:i},n):null,null)}const rt=e.createElement(it,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:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}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:i,relative:r}=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"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.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 i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=U(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);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,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.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,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const 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:i,window:r}=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:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.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"!==i.location.origin?i.location.origin:i.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(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},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:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}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={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,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=>i("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:()=>{r(),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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.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-p-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,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(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")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,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:()=>{i("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:()=>{i("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:()=>{i("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:()=>{i("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:()=>{r(),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:i,useUpdateSettings:r,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:()=>{i("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:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(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")))),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")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=tt{if(0===t)return;let i="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 i+=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:i},(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"))))),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)(wt,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)(bt,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)(g,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 +(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(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:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.React,a=window.wp.element,n=window.wp.components,i=window.lodash,r=window.wp.apiFetch;var l=t.n(r);l().use(l().createNonceMiddleware(window.gtmkitSettings.nonce)),l().use(l().createRootURLMiddleware(window.gtmkitSettings.root));const o=async(t,e,a=null,n=!1)=>{let i={};try{i=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?i:!0===i.success?i.data:options},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},c=(0,a.createContext)(),g=t=>{const[n,r]=(0,a.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:!1,canSave:!1,supportTicket:"",isSystemDataSent:!1,systemDataMessage:""}),l=async()=>{const t=window.gtmkitSettings.settings?window.gtmkitSettings.settings:{},e=window.gtmkitSettings.site_data?window.gtmkitSettings.site_data:{},a="wizard"===window.gtmkitSettings.currentPage?window.gtmkitSettings.install_data:{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},s=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,a.useEffect)((()=>{l()}),[]);const g={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(e=n.stateSettings,o("gtmkit/v1/set-options","POST",e));var e;r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:l,useUpdateState:s,useUpdateStateSettings:async(t,e,a)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let l;r[t][e]=a,l=!(0,i.isEqual)(r,n.fetchedSettings),s({stateSettings:r,canSave:l})},useImportSettings:async(t,e)=>{const a=JSON.parse(JSON.stringify(n.stateSettings));let r;const l={};l.general={...a.general,...e.general},"integrations"in e&&(l.integrations={...a.integrations,...e.integrations}),r=!(0,i.isEqual)(l,n.fetchedSettings),s({stateSettings:l,canSave:r})},useUpdateSupportTicket:async t=>{s({supportTicket:t})},useSendSystemData:async()=>{r({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;r({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,isWooAddonActive:!!window.gtmkitSettings.wa&&window.gtmkitSettings.wa};return(0,e.createElement)(c.Provider,{value:g},t.children)};function u(){return u=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=z(("string"==typeof e?S(e):e).pathname||"/",a);if(null==n)return null;let i=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)))))}(i);let r=null;for(let t=0;null==r&&t{let l={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,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))i(t,e,a);else i(t,e)})),e}function v(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,i=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return i?[r,""]:[r];let l=v(n.join("/")),o=[];return o.push(...l.map((t=>""===t?r:[r,t].join("/")))),i&&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-]+$/,w=3,b=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+=b),a.filter((t=>!D(t))).reduce(((t,e)=>t+(_.test(e)?w:""===e?T:j)),n)}function I(t,e){let{routesMeta:a}=t,n={},i="/",r=[];for(let t=0;t(n.push({paramName:e,isOptional:null!=a}),a?"/?([^\\/]+)?":"/([^\\/]+)")));return t.endsWith("*")?(n.push({paramName:"*"}),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),i=e.match(a);if(!i)return null;let r=i[0],l=r.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce(((t,e,a)=>{let{paramName:n,isOptional:i}=e;if("*"===n){let t=o[a]||"";l=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}const s=o[a];return t[n]=i&&!s?void 0:(s||"").replace(/%2F/g,"/"),t}),{}),pathname:r,pathnameBase:l,pattern:t}}function A(t){try{return t.split("/").map((t=>decodeURIComponent(t).replace(/\//g,"%2F"))).join("/")}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 z(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 i;void 0===n&&(n=!1),"string"==typeof t?i=S(t):(i=u({},t),h(!i.pathname||!i.pathname.includes("?"),U("?","pathname","search",i)),h(!i.pathname||!i.pathname.includes("#"),U("#","pathname","hash",i)),h(!i.search||!i.search.includes("#"),U("#","search","hash",i)));let r,l=""===t||""===i.pathname,o=l?"/":i.pathname;if(null==o)r=a;else{let t=e.length-1;if(!n&&o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:i=""}="string"==typeof t?S(t):t,r=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:r,search:W(n),hash:Y(i)}}(i,r),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,i){void 0===i&&(i={}),n.current&&("number"==typeof e?t.navigate(e):t.navigate(e,J({fromRouteId:a},i)))}),[t,a])}():function(){q()||h(!1);let t=e.useContext(H),{basename:a,future:n,navigator:i}=e.useContext(Z),{matches:r}=e.useContext(V),{pathname:l}=tt(),o=JSON.stringify(P(r,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 i.go(e);let r=R(e,JSON.parse(o),l,"path"===n.relative);null==t&&"/"!==a&&(r.pathname="/"===r.pathname?a:G([a,r.pathname])),(n.replace?i.replace:i.push)(r,n.state,n)}),[a,i,o,l,t])}()}function nt(t,a,n,i){q()||h(!1);let{navigator:r}=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,g=tt();if(a){var u;let t="string"==typeof a?S(a):a;"/"===m||(null==(u=t.pathname)?void 0:u.startsWith(m))||h(!1),c=t}else c=g;let p=c.pathname||"/",k=p;if("/"!==m){let t=m.replace(/^\//,"").split("/");k="/"+p.replace(/^\//,"").split("/").slice(t.length).join("/")}let y=M(t,{pathname:k}),f=function(t,a,n,i){var r;if(void 0===a&&(a=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==t){var l;if(null==(l=n)||!l.errors)return null;t=n.matches}let o=t,s=null==(r=n)?void 0:r.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&&i&&i.v7_partialHydration)for(let t=0;t=0?o.slice(0,c+1):[o[0]];break}}}return o.reduceRight(((t,i,r)=>{let l,g=!1,u=null,d=null;var p;n&&(l=s&&i.route.id?s[i.route.id]:void 0,u=i.route.errorElement||rt,m&&(c<0&&0===r?(gt[p="route-fallback"]||(gt[p]=!0),g=!0,d=null):c===r&&(g=!0,d=i.route.hydrateFallbackElement||null)));let h=a.concat(o.slice(0,r+1)),k=()=>{let a;return a=l?u:g?d:i.route.Component?e.createElement(i.route.Component,null):i.route.element?i.route.element:t,e.createElement(ot,{match:i,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:a})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?e.createElement(lt,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:k(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):k()}),null)}(y&&y.map((t=>Object.assign({},t,{params:Object.assign({},s,t.params),pathname:G([m,r.encodeLocation?r.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?m:G([m,r.encodeLocation?r.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),l,n,i);return a&&f?e.createElement(K.Provider,{value:{location:J({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:d.Pop}},f):f}function it(){let t=function(){var t;let a=e.useContext(X),n=function(t){let a=e.useContext($);return a||h(!1),a}(mt.UseRouteError),i=ct(mt.UseRouteError);return void 0!==a?a:null==(t=n.errors)?void 0:t[i]}(),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,i={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:i},n):null,null)}const rt=e.createElement(it,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:i}=t,r=e.useContext(H);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(V.Provider,{value:a},i)}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:i,relative:r}=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"===r),u=JSON.stringify(g);return e.useEffect((()=>c(JSON.parse(u),{replace:n,state:i,relative:r})),[c,u,r,n,i]),null}function dt(t){h(!1)}function pt(t){let{basename:a="/",children:n=null,location:i,navigationType:r=d.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 i&&(i=S(i));let{pathname:g="/",search:u="",hash:p="",state:k=null,key:y="default"}=i,f=e.useMemo((()=>{let t=z(g,m);return null==t?null:{location:{pathname:t,search:u,hash:p,state:k,key:y},navigationType:r}}),[m,g,u,p,k,y,r]);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,i)=>{if(!e.isValidElement(t))return;let r=[...a,i];if(t.type===e.Fragment)return void n.push.apply(n,kt(t.props.children,r));t.type!==dt&&h(!1),t.props.index&&t.props.children&&h(!1);let l={id:t.props.id||r.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,r)),n.push(l)})),n}e.startTransition,new Promise((()=>{})),e.Component;const yt=window.ReactDOM;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(t){}new Map;const ft=e.startTransition;function Et(t){let{basename:a,children:n,future:i,window:r}=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:i=document.defaultView,v5Compat:r=!1}=n,l=i.history,o=d.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function g(){o=d.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"!==i.location.origin?i.location.origin:i.location.href,a="string"==typeof t?t:E(t);return a=a.replace(/ $/,"%20"),h(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(u({},l.state,{idx:m}),""));let S={get action(){return o},get location(){return t(i,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(p,g),s=t,()=>{i.removeEventListener(p,g),s=null}},createHref:t=>e(i,t),createURL:k,encodeLocation(t){let e=k(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=d.Push;let n=f(S.location,t,e);a&&a(n,t),m=c()+1;let g=y(n,m),u=S.createHref(n);try{l.pushState(g,"",u)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(u)}r&&s&&s({action:o,location:S.location,delta:1})},replace:function(t,e){o=d.Replace;let n=f(S.location,t,e);a&&a(n,t),m=c();let i=y(n,m),g=S.createHref(n);l.replaceState(i,"",g),r&&s&&s({action:o,location:S.location,delta:0})},go:t=>l.go(t)};return S}((function(t,e){let{pathname:a="/",search:n="",hash:i=""}=S(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),f("",{pathname:a,search:n,hash:i},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:r,v5Compat:!0}));let o=l.current,[s,m]=e.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},g=e.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return e.useLayoutEffect((()=>o.listen(g)),[o,g]),e.createElement(pt,{basename:a,children:n,location:s.location,navigationType:s.action,navigator:o,future:i})}var St,xt;yt.flushSync,e.useId,"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={}));const Mt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,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=>i("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:()=>{r(),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:i,useInstallData:r}=(0,a.useContext)(c),[l,o]=(0,a.useState)(!0),m=Object.keys(r.import_data)[0],[g,u]=(0,a.useState)(m),d=[];return Object.keys(r.import_data).forEach((t=>{d.push({value:t,label:r.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-p-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,r.import_data[g]),o(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),i?(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")),i?(0,e.createElement)(n.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,a.useContext)(c),{firstInstall:n}=t,{importAvailable:i}=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&&i?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},_t=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,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:()=>{i("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:()=>{i("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:()=>{i("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:()=>{i("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:()=>{r(),m("/share-anonymous-data",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},wt=()=>{const{useSettings:t,useUpdateStateSettings:i,useUpdateSettings:r,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:()=>{i("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:()=>{r(),m("/getting-started",{replace:!0})},disabled:l},(0,s.__)("Save and continue","gtm-kit"),l?(0,e.createElement)(n.Spinner,null):"")))},bt=()=>(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")))),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")}],jt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let i="gtmkit-h-0.5 gtmkit-w-full";return i+=tt{if(0===t)return;let i="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 i+=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:i},(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"))))),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)(wt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,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"})},zt=()=>(0,e.createElement)(Et,{basename:"/"},(0,e.createElement)(g,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)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))})(); \ No newline at end of file diff --git a/gtm-kit.php b/gtm-kit.php index c776c81..f18bf52 100644 --- a/gtm-kit.php +++ b/gtm-kit.php @@ -3,7 +3,7 @@ * GTM Kit Plugin * * Plugin Name: GTM Kit - * Version: 1.20 + * Version: 1.21 * Plugin URI: https://gtmkit.com/ * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. * Author: GTM Kit @@ -27,7 +27,7 @@ exit(); } -const GTMKIT_VERSION = '1.20'; +const GTMKIT_VERSION = '1.21'; if ( ! defined( 'GTMKIT_FILE' ) ) { define( 'GTMKIT_FILE', __FILE__ ); diff --git a/languages/gtm-kit.pot b/languages/gtm-kit.pot index e131c2c..5826f9d 100644 --- a/languages/gtm-kit.pot +++ b/languages/gtm-kit.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: GTM Kit 1.20\n" +"Project-Id-Version: GTM Kit 1.21\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: 2024-03-18T14:28:44+00:00\n" +"POT-Creation-Date: 2024-04-13T13:18:02+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" @@ -60,12 +60,12 @@ msgstr "" msgid "Only authenticated users can access endpoint." msgstr "" -#: src/Admin/AdminAPI.php:135 -#: src/Admin/AdminAPI.php:140 +#: src/Admin/AdminAPI.php:134 +#: src/Admin/AdminAPI.php:139 msgid "The support ticket was not found. Please check that you have entered the correct ticket." msgstr "" -#: src/Admin/AdminAPI.php:137 +#: src/Admin/AdminAPI.php:136 msgid "Thank you! We have received the data." msgstr "" @@ -111,53 +111,53 @@ msgstr "" msgid "GTM Templates" msgstr "" -#: src/Common/Util.php:132 +#: src/Common/Util.php:152 msgid "Server type:" msgstr "" -#: src/Common/Util.php:137 +#: src/Common/Util.php:157 msgid "PHP version number:" msgstr "" -#: src/Common/Util.php:142 +#: src/Common/Util.php:162 msgid "WordPress version number:" msgstr "" -#: src/Common/Util.php:147 +#: src/Common/Util.php:167 msgid "WordPress multisite:" msgstr "" -#: src/Common/Util.php:148 +#: src/Common/Util.php:168 #: assets/admin/wizard.js:1 msgid "Yes" msgstr "" -#: src/Common/Util.php:148 +#: src/Common/Util.php:168 #: assets/admin/wizard.js:1 msgid "No" msgstr "" -#: src/Common/Util.php:152 +#: src/Common/Util.php:172 msgid "Current theme:" msgstr "" -#: src/Common/Util.php:157 +#: src/Common/Util.php:177 msgid "Current site language:" msgstr "" -#: src/Common/Util.php:162 +#: src/Common/Util.php:182 msgid "Active plugins:" msgstr "" -#: src/Common/Util.php:163 +#: src/Common/Util.php:183 msgid "Plugin name and version of all active plugins" msgstr "" -#: src/Common/Util.php:167 +#: src/Common/Util.php:187 msgid "Anonymized GTM Kit settings:" msgstr "" -#: src/Common/Util.php:168 +#: src/Common/Util.php:188 msgid "Which GTM Kit settings are active" msgstr "" @@ -175,7 +175,7 @@ msgid "Best Sellers" msgstr "" #: src/Integration/WooCommerce.php:250 -#: src/Integration/WooCommerce.php:966 +#: src/Integration/WooCommerce.php:967 msgid "Product Category" msgstr "" @@ -192,7 +192,7 @@ msgid "Products By Attribute" msgstr "" #: src/Integration/WooCommerce.php:254 -#: src/Integration/WooCommerce.php:968 +#: src/Integration/WooCommerce.php:969 msgid "Product Tag" msgstr "" @@ -204,21 +204,21 @@ msgstr "" msgid "Shipping tier not found" msgstr "" -#: src/Integration/WooCommerce.php:825 +#: src/Integration/WooCommerce.php:826 msgid "Grouped Product" msgstr "" -#: src/Integration/WooCommerce.php:859 +#: src/Integration/WooCommerce.php:860 msgid "Search Results" msgstr "" -#: src/Integration/WooCommerce.php:859 -#: src/Integration/WooCommerce.php:900 -#: src/Integration/WooCommerce.php:933 +#: src/Integration/WooCommerce.php:860 +#: src/Integration/WooCommerce.php:901 +#: src/Integration/WooCommerce.php:934 msgid "General Product List" msgstr "" -#: src/Integration/WooCommerce.php:1117 +#: src/Integration/WooCommerce.php:1118 msgid "GTM Kit data." msgstr "" @@ -268,52 +268,12 @@ msgstr "" msgid "Easy way to sell Digital Products With WordPress" msgstr "" -#: assets/admin/settings.js:1 -msgid "How to get the most out of Google Tag Manager with GTM Kit." -msgstr "" - -#: assets/admin/settings.js:1 -msgid "WooCommerce integration" -msgstr "" - -#: assets/admin/settings.js:1 -msgid "Integrate WooCommerce with Google Tag Manager and Google Analytics." -msgstr "" - -#: assets/admin/settings.js:1 -msgid "Integrate Contact Form 7 with Google Tag Manager and Google Analytics." -msgstr "" - -#: assets/admin/settings.js:1 -msgid "Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics." -msgstr "" - -#: assets/admin/settings.js:1 -msgid "How to setup Google Analytics (GA4) in Google Tag Manager" -msgstr "" - -#: assets/admin/settings.js:1 -msgid "Learn how to configure the necessary tags to make Google Analytics collect your data." -msgstr "" - -#: assets/admin/settings.js:1 -msgid "Customization of the GTM container implementation and Server Side Tracking." -msgstr "" - -#: 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:1 -msgid "Delaying JavaScript execution is a powerful page speed optimization technique." -msgstr "" - #: assets/admin/settings.js:1 msgid "See all tutorials…" msgstr "" #: assets/admin/settings.js:1 -msgid "See all our tutorial and get the most out of GTM Kit" +msgid "See all our tutorials and get the most out of GTM Kit" msgstr "" #: assets/admin/settings.js:1 @@ -402,7 +362,7 @@ msgid "dataLayer variable name:" msgstr "" #: 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." +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 so." msgstr "" #: assets/admin/settings.js:1 @@ -446,6 +406,7 @@ msgid "Google Tag Manager Server-side Tagging" msgstr "" #: assets/admin/settings.js:1 +#: assets/admin/settings.js:13 msgid "Learn more" msgstr "" @@ -538,7 +499,7 @@ msgid "Override settings in wp-config.php" msgstr "" #: 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." +msgid "You can override the values by 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:1 @@ -554,7 +515,7 @@ msgid "Standard implementation as recommended by Google (no delay)" msgstr "" #: assets/admin/settings.js:1 -msgid "Load container when browser is idle (requestIdleCallback)" +msgid "Load container when the browser is idle (requestIdleCallback)" msgstr "" #: assets/admin/settings.js:1 @@ -663,6 +624,7 @@ msgid "Include the post author ID." msgstr "" #: assets/admin/settings.js:1 +#: assets/admin/settings.js:13 msgid "User Data" msgstr "" @@ -956,6 +918,14 @@ msgstr "" msgid "Enable this option to include customer data in the data layer on the \"purchase\" event." msgstr "" +#: assets/admin/settings.js:13 +msgid "User-Provided Data" +msgstr "" + +#: assets/admin/settings.js:13 +msgid "The user data is available in the datalayer in 'ecommerce.customer' and a subset of the user data formatted for the 'User-Provided Data' variable is available in 'user-data'." +msgstr "" + #: assets/admin/settings.js:13 msgid "Webhooks for server-side tracking" msgstr "" @@ -1137,7 +1107,7 @@ msgid "Load JavaScript" msgstr "" #: assets/admin/settings.js:13 -msgid "Only on pages where where the Contact Form 7 script is registered (recommended)." +msgid "Only on pages where the Contact Form 7 script is registered (recommended)." msgstr "" #: assets/admin/settings.js:13 @@ -1152,10 +1122,6 @@ msgstr "" msgid "Easy Digital Downloads" msgstr "" -#: assets/admin/settings.js:13 -msgid "Choose between a basic configuration and an advanced eCommerce configuration" -msgstr "" - #: assets/admin/settings.js:13 msgid "Get template" msgstr "" @@ -1177,18 +1143,6 @@ msgstr "" msgid "Below you will find GTM container template files, with all the necessary tags, trigger, and variables." msgstr "" -#: assets/admin/settings.js:13 -msgid "Templates" -msgstr "" - -#: assets/admin/settings.js:13 -msgid "Google Analytics 4" -msgstr "" - -#: assets/admin/settings.js:13 -msgid "Before you start" -msgstr "" - #: assets/admin/settings.js:13 #: assets/admin/wizard.js:1 msgid "Please read the guide on how to use the import files and configure GTM." @@ -1200,51 +1154,17 @@ msgid "Read the guide" msgstr "" #: assets/admin/settings.js:13 -msgid "Basic configuration" -msgstr "" - -#: assets/admin/settings.js:13 -msgid "If you don't have eCommerce functionality then this is the right choice for you." -msgstr "" - -#: assets/admin/settings.js:13 -msgid "This template includes the Google Tag, which will send basic events to Google Analytics 4." +msgid "Templates" msgstr "" #: assets/admin/settings.js:13 msgid "GTM container import files:" msgstr "" -#: assets/admin/settings.js:13 -#: assets/admin/wizard.js:1 -msgid "Google Analytics 4 - Basic Configuration" -msgstr "" - #: assets/admin/settings.js:13 msgid "Necessary modifications:" msgstr "" -#: assets/admin/settings.js:13 -msgid "Edit the variable with the name \"constant - GA4 Measurement ID\" and enter your Google Analytics 4 Measurement ID." -msgstr "" - -#: assets/admin/settings.js:13 -msgid "eCommerce configuration" -msgstr "" - -#: assets/admin/settings.js:13 -msgid "If you have a webshop then this is the right choice for you." -msgstr "" - -#: assets/admin/settings.js:13 -msgid "This template includes the Google Tag and a Google Analytics GA4 event tag, that will catch all eCommerce events and send them to Google Analytics 4." -msgstr "" - -#: assets/admin/settings.js:13 -#: assets/admin/wizard.js:1 -msgid "Google Analytics 4 - eCommerce" -msgstr "" - #: assets/admin/settings.js:13 msgid "Need help?" msgstr "" @@ -1437,6 +1357,14 @@ msgstr "" msgid "Google Tag Manager templates" msgstr "" +#: assets/admin/wizard.js:1 +msgid "Google Analytics 4 - Basic Configuration" +msgstr "" + +#: assets/admin/wizard.js:1 +msgid "Google Analytics 4 - eCommerce" +msgstr "" + #: assets/admin/wizard.js:1 msgid "Getting started with GTM Kit" msgstr "" diff --git a/package-lock.json b/package-lock.json index 218260c..5fbd253 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gtm-kit", - "version": "1.20.1", + "version": "1.21.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gtm-kit", - "version": "1.20.1", + "version": "1.21.0", "dependencies": { "@wordpress/api-fetch": "^6.52.0", "@wordpress/components": "^27.3.0", diff --git a/package.json b/package.json index 85d5db3..c3d56c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gtm-kit", - "version": "1.20.1", + "version": "1.21.0", "description": "Development files for the GTM Kit", "author": "GTM Kit", "keywords": [ diff --git a/readme.txt b/readme.txt index d9814a0..c3896dc 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: tlamedia, torbenlundsgaard, gtmkit Donate link: https://github.com/tlamedia/gtm-kit Tags: google tag manager, gtm, woocommerce, analytics, ga4 Tested up to: 6.5 -Stable tag: 1.20 +Stable tag: 1.21 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -88,18 +88,20 @@ Yes! Pagespeed is one of our main focus points, and we strive to make the plugin == Changelog == -= 1.X = += 1.21 = -Release date: 2024-MM-DD +Release date: 2024-04-15 Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1-21/). #### Enhancements: * Added user-data in the datalayer containing user data formatted for the User-Provided Data variable so you don't have to map it manually. +* Added Google Tag Manager templates for Google Ads and Facebook. * Added dynamic template sections that allows for template updates wíthout updating the plugin. * The tutorial section is now dynamic and based on a feed, so we don't have to update the plugin to include new tutorials. #### Bugfixes: +* JavaScript translations was not loaded correct. #### Other: * Tested up to WooCommerce 8.8. diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 788064a..a461479 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'tlamedia/gtm-kit', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '13f8049cf6cb47d0b7bde3a66140d905566fbb3e', + 'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ 'tlamedia/gtm-kit' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '13f8049cf6cb47d0b7bde3a66140d905566fbb3e', + 'reference' => '69fa09250144c7b59d5dd4a710061f83135678f4', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),