Comparing version 1.4.0 to 1.5.0
@@ -193,2 +193,10 @@ function _typeof(obj) { | ||
var refund = (function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
event.apply(void 0, ["refund"].concat(args)); | ||
}); | ||
var set = (function () { | ||
@@ -230,2 +238,3 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
purchase: purchase, | ||
refund: refund, | ||
set: set, | ||
@@ -232,0 +241,0 @@ optIn: optIn, |
@@ -197,2 +197,10 @@ 'use strict'; | ||
var refund = (function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
event.apply(void 0, ["refund"].concat(args)); | ||
}); | ||
var set = (function () { | ||
@@ -234,2 +242,3 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
purchase: purchase, | ||
refund: refund, | ||
set: set, | ||
@@ -236,0 +245,0 @@ optIn: optIn, |
@@ -199,2 +199,10 @@ (function (global, factory) { | ||
var refund = (function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
event.apply(void 0, ["refund"].concat(args)); | ||
}); | ||
var set = (function () { | ||
@@ -236,2 +244,3 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
purchase: purchase, | ||
refund: refund, | ||
set: set, | ||
@@ -238,0 +247,0 @@ optIn: optIn, |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).VueGtag={})}(this,function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o=function(){};function a(e,n){console.warn("[vue-gtag] "+e),n&&n.stack&&console.warn(n.stack)}function r(e){return e&&"object"===n(e)&&!Array.isArray(e)}function i(){var e,n=k().globalObjectName;"undefined"!=typeof window&&(e=window)[n].apply(e,arguments)}var c,u,f=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=k(),a=o.config,r=o.includes;i.apply(void 0,["config",a.id].concat(n)),Array.isArray(r)&&r.forEach(function(e){i.apply(void 0,["config",e.id].concat(n))})},p=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=k(),o=t.defaultGroupName,a=t.includes,r=n;a&&null==r.send_to&&(r.send_to=a.map(function(e){return e.id}).concat(o)),i("event",e,r)},d=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["page_view"].concat(n))},l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["screen_view"].concat(n))},s=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=k().config;window["ga-disable-".concat(n.id)]=e},g=function(){s(!0)},v={query:i,config:f,event:p,pageview:d,screenview:l,customMap:function(e){f({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["timing_complete"].concat(n))},exception:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["exception"].concat(n))},linker:function(e){f("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["purchase"].concat(n))},set:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];i.apply(void 0,["set"].concat(n))},optIn:function(){s(!1)},optOut:g},w=function(){var e=T();e.$gtag=e.prototype.$gtag=v},y=function(e){var n=k(),t=n.onBeforeTrack,o=n.onAfterTrack;e.onReady(function(){e.afterEach(function(e,n){t(e,n),function(e,n){if(e.path!==n.path){var t,o=k(),r=o.pageTrackerTemplate,i=o.pageTrackerScreenviewEnabled,c=o.appName,u=r(e,n);t=u||(i?{app_name:c,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href}),!i||t.app_name?!i||t.screen_name?i?l(t):d(t):a("To use the screenview, name your routes"):a("To use the screenview, add the appName to the plugin options")}}(e,n),o(e,n)})})},m=function(){var e=_();e&&y(e)};function h(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=k(),n=e.enabled,t=e.globalObjectName,o=e.config,r=o.id,i=o.params,c=e.includes,u=e.pageTrackerEnabled,f=e.onReady,p=e.disableScriptLoad;if(n||g(),null==window[t]&&(window.dataLayer=window.dataLayer||[],window[t]=function(){window.dataLayer.push(arguments)}),window[t]("js",new Date),i?window[t]("config",r,i):window[t]("config",r),Array.isArray(c)&&c.forEach(function(e){e.params?window[t]("config",e.id,e.params):window[t]("config",e.id)}),u&&m(),!p){var d="https://www.googletagmanager.com";return function(e,n){return new Promise(function(t,o){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("script");if(r.async=!0,r.src=e,r.charset="utf-8",n){var i=document.createElement("link");i.href=n,i.rel="preconnect",a.appendChild(i)}a.appendChild(r),r.onload=t,r.onerror=o})}("".concat(d,"/gtag/js?id=").concat(r),d).then(function(){var e=window[t];return"function"==typeof f&&f(e),e}).catch(function(e){return a("Ops! Something happened and gtag.js couldn't be loaded",e),e})}}}var b={pageTrackerTemplate:o,onBeforeTrack:o,onAfterTrack:o,onReady:o,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,defaultGroupName:"default",includes:null,config:null},k=function(){return b},A=function(e){return function e(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];if(!a.length)return n;var c=a.shift();if(r(n)&&r(c)){for(var u in c)r(c[u])?(n[u]||Object.assign(n,t({},u,{})),e(n[u],c[u])):Object.assign(n,t({},u,c[u]));return e.apply(void 0,[n].concat(a))}}(b,e)},T=function(){return c},_=function(){return u};function j(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;c=e,u=t,A(n),w(),b.bootstrap&&h()}var O=h,E=A,S=v.query,N=v.config,x=v.event,L=v.pageview,M=v.screenview,q=v.customMap,B=v.time,G=v.exception,I=v.linker,P=v.purchase,R=v.set,C=v.optIn,$=v.optOut;e.bootstrap=O,e.config=N,e.customMap=q,e.default=j,e.event=x,e.exception=G,e.install=j,e.linker=I,e.optIn=C,e.optOut=$,e.pageview=L,e.purchase=P,e.query=S,e.screenview=M,e.set=R,e.setOptions=E,e.time=B,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).VueGtag={})}(this,function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o=function(){};function a(e,n){console.warn("[vue-gtag] "+e),n&&n.stack&&console.warn(n.stack)}function r(e){return e&&"object"===n(e)&&!Array.isArray(e)}function i(){var e,n=k().globalObjectName;"undefined"!=typeof window&&(e=window)[n].apply(e,arguments)}var c,u,f=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=k(),a=o.config,r=o.includes;i.apply(void 0,["config",a.id].concat(n)),Array.isArray(r)&&r.forEach(function(e){i.apply(void 0,["config",e.id].concat(n))})},p=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=k(),o=t.defaultGroupName,a=t.includes,r=n;a&&null==r.send_to&&(r.send_to=a.map(function(e){return e.id}).concat(o)),i("event",e,r)},d=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["page_view"].concat(n))},l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["screen_view"].concat(n))},s=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=k().config;window["ga-disable-".concat(n.id)]=e},g=function(){s(!0)},v={query:i,config:f,event:p,pageview:d,screenview:l,customMap:function(e){f({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["timing_complete"].concat(n))},exception:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["exception"].concat(n))},linker:function(e){f("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["purchase"].concat(n))},refund:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];p.apply(void 0,["refund"].concat(n))},set:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];i.apply(void 0,["set"].concat(n))},optIn:function(){s(!1)},optOut:g},w=function(){var e=T();e.$gtag=e.prototype.$gtag=v},y=function(e){var n=k(),t=n.onBeforeTrack,o=n.onAfterTrack;e.onReady(function(){e.afterEach(function(e,n){t(e,n),function(e,n){if(e.path!==n.path){var t,o=k(),r=o.pageTrackerTemplate,i=o.pageTrackerScreenviewEnabled,c=o.appName,u=r(e,n);t=u||(i?{app_name:c,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href}),!i||t.app_name?!i||t.screen_name?i?l(t):d(t):a("To use the screenview, name your routes"):a("To use the screenview, add the appName to the plugin options")}}(e,n),o(e,n)})})},m=function(){var e=_();e&&y(e)};function h(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=k(),n=e.enabled,t=e.globalObjectName,o=e.config,r=o.id,i=o.params,c=e.includes,u=e.pageTrackerEnabled,f=e.onReady,p=e.disableScriptLoad;if(n||g(),null==window[t]&&(window.dataLayer=window.dataLayer||[],window[t]=function(){window.dataLayer.push(arguments)}),window[t]("js",new Date),i?window[t]("config",r,i):window[t]("config",r),Array.isArray(c)&&c.forEach(function(e){e.params?window[t]("config",e.id,e.params):window[t]("config",e.id)}),u&&m(),!p){var d="https://www.googletagmanager.com";return function(e,n){return new Promise(function(t,o){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("script");if(r.async=!0,r.src=e,r.charset="utf-8",n){var i=document.createElement("link");i.href=n,i.rel="preconnect",a.appendChild(i)}a.appendChild(r),r.onload=t,r.onerror=o})}("".concat(d,"/gtag/js?id=").concat(r),d).then(function(){var e=window[t];return"function"==typeof f&&f(e),e}).catch(function(e){return a("Ops! Something happened and gtag.js couldn't be loaded",e),e})}}}var b={pageTrackerTemplate:o,onBeforeTrack:o,onAfterTrack:o,onReady:o,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,defaultGroupName:"default",includes:null,config:null},k=function(){return b},A=function(e){return function e(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];if(!a.length)return n;var c=a.shift();if(r(n)&&r(c)){for(var u in c)r(c[u])?(n[u]||Object.assign(n,t({},u,{})),e(n[u],c[u])):Object.assign(n,t({},u,c[u]));return e.apply(void 0,[n].concat(a))}}(b,e)},T=function(){return c},_=function(){return u};function j(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;c=e,u=t,A(n),w(),b.bootstrap&&h()}var O=h,E=A,S=v.query,N=v.config,x=v.event,L=v.pageview,M=v.screenview,q=v.customMap,B=v.time,G=v.exception,I=v.linker,P=v.purchase,R=v.set,C=v.optIn,$=v.optOut;e.bootstrap=O,e.config=N,e.customMap=q,e.default=j,e.event=x,e.exception=G,e.install=j,e.linker=I,e.optIn=C,e.optOut=$,e.pageview=L,e.purchase=P,e.query=S,e.screenview=M,e.set=R,e.setOptions=E,e.time=B,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=vue-gtag.umd.min.js.map |
{ | ||
"name": "vue-gtag", | ||
"description": "Global Site Tag (gtag.js) plugin for Vue", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Matteo Gabriele", |
@@ -32,2 +32,8 @@ declare module 'vue-gtag' { | ||
export interface Refund { | ||
transaction_id: string; | ||
affiliation: string; | ||
value: number; | ||
} | ||
export interface Linker { | ||
@@ -59,2 +65,3 @@ domains: string[]; | ||
purchase(purchase: Purchase): void; | ||
refund(refund: Refund): void; | ||
linker(config: Linker): void; | ||
@@ -61,0 +68,0 @@ exception(ex: Exception): void; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
62563
1258
0