@gtm-support/vue-gtm
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -1,2 +0,2 @@ | ||
import{GtmSupport as v,loadScript as m}from"@gtm-support/core";import{nextTick as O}from"vue";import{GtmSupport as k,assertIsGtmId as L,hasScript as S,loadScript as U}from"@gtm-support/core";var t;function G(i,e={id:""}){e={trackOnNextTick:!1,...e},t=new v(e),i.config.globalProperties.$gtm=t,t.isInBrowserContext()&&(e.vueRouter&&A(i,e.vueRouter,e.ignoredViews,e.trackOnNextTick,e.vueRouterAdditionalEventData),t.options.enabled&&t.options.loadScript&&(Array.isArray(e.id)?e.id.forEach(a=>{if(typeof a=="string")m(a,e);else{let o={...e};a.queryParams!=null&&(o.queryParams={...o.queryParams,...a.queryParams}),m(a.id,o)}}):m(e.id,e))),i.provide("gtm",e)}function A(i,e,a=[],o,g=()=>({})){function p(r,u){return r instanceof Error?!!(r.type&u):!1}e.afterEach(async(r,u,d)=>{var c,f,y;if(typeof r.name!="string"||Array.isArray(a)&&a.includes(r.name)||typeof a=="function"&&a(r,u))return;let s=r.meta&&typeof r.meta.gtm=="string"&&r.meta.gtm?r.meta.gtm:r.name;p(d,4)?t!=null&&t.debugEnabled()&&console.log(`[VueGtm]: '${s}' not tracked due to navigation aborted`):p(d,8)&&t!=null&&t.debugEnabled()&&console.log(`[VueGtm]: '${s}' not tracked due to navigation cancelled`);let l={...await g(r,u),...(c=r.meta)==null?void 0:c.gtmAdditionalEventData},n=((y=(f=e.options)==null?void 0:f.history)==null?void 0:y.base)??"";n.endsWith("/")||(n+="/"),n+=r.fullPath.startsWith("/")?r.fullPath.substring(1):r.fullPath,o?O(()=>{t==null||t.trackView(s,n,l)}):t==null||t.trackView(s,n,l)})}function x(i){return{install:e=>G(e,i)}}var N={install:G};var T=N;function P(){return t}export{v as GtmPlugin,k as GtmSupport,L as assertIsGtmId,x as createGtm,T as default,S as hasScript,U as loadScript,P as useGtm}; | ||
import{GtmSupport as g,loadScript as m}from"@gtm-support/core";import{nextTick as y}from"vue";import{GtmSupport as T,assertIsGtmId as b,hasScript as I,loadScript as k}from"@gtm-support/core";var i;function c(a,t={id:""}){t={trackOnNextTick:!1,...t},i=new g(t),a.config.globalProperties.$gtm=i,i.isInBrowserContext()&&(t.vueRouter&&G(a,t.vueRouter,t.ignoredViews,t.trackOnNextTick,t.vueRouterAdditionalEventData),i.options.enabled&&i.options.loadScript&&(Array.isArray(t.id)?t.id.forEach(r=>{if(typeof r=="string")m(r,t);else{let n={...t};r.queryParams!=null&&(n.queryParams={...n.queryParams,...r.queryParams}),m(r.id,n)}}):m(t.id,t))),a.provide("gtm",t)}function G(a,t,r=[],n,f=()=>({})){function l(e,u){return e instanceof Error?!!(e.type&u):!1}t.afterEach(async(e,u,p)=>{if(typeof e.name!="string"||Array.isArray(r)&&r.includes(e.name)||typeof r=="function"&&r(e,u))return;let s=e.meta&&typeof e.meta.gtm=="string"&&e.meta.gtm?e.meta.gtm:e.name;l(p,4)?i?.debugEnabled()&&console.log(`[VueGtm]: '${s}' not tracked due to navigation aborted`):l(p,8)&&i?.debugEnabled()&&console.log(`[VueGtm]: '${s}' not tracked due to navigation cancelled`);let d={...await f(e,u),...e.meta?.gtmAdditionalEventData},o=t.options?.history?.base??"";o.endsWith("/")||(o+="/"),o+=e.fullPath.startsWith("/")?e.fullPath.substring(1):e.fullPath,n?y(()=>{i?.trackView(s,o,d)}):i?.trackView(s,o,d)})}function N(a){return{install:t=>c(t,a)}}var v={install:c};var V=v;function E(){return i}export{g as GtmPlugin,T as GtmSupport,b as assertIsGtmId,N as createGtm,V as default,I as hasScript,k as loadScript,E as useGtm}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@gtm-support/vue-gtm", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Simple implementation of Google Tag Manager for Vue", | ||
@@ -73,9 +73,9 @@ "scripts": { | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "~6.2.1", | ||
"@typescript-eslint/parser": "~6.2.1", | ||
"eslint": "~8.46.0", | ||
"eslint-config-prettier": "~8.9.0", | ||
"eslint-define-config": "~1.22.0", | ||
"@typescript-eslint/eslint-plugin": "~6.7.2", | ||
"@typescript-eslint/parser": "~6.7.2", | ||
"eslint": "~8.49.0", | ||
"eslint-config-prettier": "~9.0.0", | ||
"eslint-define-config": "~1.23.0", | ||
"eslint-gitignore": "~0.1.0", | ||
"eslint-plugin-jsdoc": "~46.4.5", | ||
"eslint-plugin-jsdoc": "~46.8.2", | ||
"eslint-plugin-prettier": "~5.0.0", | ||
@@ -85,10 +85,10 @@ "eslint-plugin-spellcheck": "~0.0.20", | ||
"npm-run-all": "~4.1.5", | ||
"prettier": "3.0.0", | ||
"prettier": "3.0.3", | ||
"prettier-plugin-organize-imports": "~3.2.3", | ||
"rimraf": "~5.0.1", | ||
"tsup": "~7.1.0", | ||
"typescript": "~5.1.6", | ||
"vitest": "~0.34.0", | ||
"tsup": "~7.2.0", | ||
"typescript": "~5.2.2", | ||
"vitest": "~0.34.5", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.4" | ||
"vue-router": "^4.2.5" | ||
}, | ||
@@ -106,3 +106,3 @@ "peerDependencies": { | ||
}, | ||
"packageManager": "pnpm@8.6.11" | ||
"packageManager": "pnpm@8.7.6" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
78968
0
38111
36