Comparing version 1.6.4 to 1.6.5
@@ -362,2 +362,5 @@ function _typeof(obj) { | ||
var Router = getRouter(); | ||
var isPageTrackerEnabled = Boolean(pageTrackerEnabled && Router); | ||
if (!enabled) { | ||
@@ -376,6 +379,7 @@ optOut(); | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
if (pageTrackerEnabled) { | ||
if (isPageTrackerEnabled) { | ||
pageTracker(); | ||
} else { | ||
config(); | ||
} | ||
@@ -382,0 +386,0 @@ |
@@ -366,2 +366,5 @@ 'use strict'; | ||
var Router = getRouter(); | ||
var isPageTrackerEnabled = Boolean(pageTrackerEnabled && Router); | ||
if (!enabled) { | ||
@@ -380,6 +383,7 @@ optOut(); | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
if (pageTrackerEnabled) { | ||
if (isPageTrackerEnabled) { | ||
pageTracker(); | ||
} else { | ||
config(); | ||
} | ||
@@ -386,0 +390,0 @@ |
@@ -368,2 +368,5 @@ (function (global, factory) { | ||
var Router = getRouter(); | ||
var isPageTrackerEnabled = Boolean(pageTrackerEnabled && Router); | ||
if (!enabled) { | ||
@@ -382,6 +385,7 @@ optOut(); | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
if (pageTrackerEnabled) { | ||
if (isPageTrackerEnabled) { | ||
pageTracker(); | ||
} else { | ||
config(); | ||
} | ||
@@ -388,0 +392,0 @@ |
@@ -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];var o=n[0],a={};a="string"==typeof o?{page_path:o,page_location:window.location.href}:o,f(a)},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(),t=n.includes,o=n.config;window["ga-disable-".concat(o.id)]=e,Array.isArray(t)&&t.forEach(function(n){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},y=function(){var e=T();e.$gtag=e.prototype.$gtag=v},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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")}},h=function(){var e=_();e&&function(e){var n=T(),t=k(),o=t.onBeforeTrack,a=t.onAfterTrack;e.onReady(function(t){n.nextTick().then(function(){w(t)}),e.afterEach(function(e,t){n.nextTick().then(function(){o(e,t),w(e,t),a(e,t)})})})}(e)};function m(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=k(),n=e.enabled,t=e.globalObjectName,o=e.config.id,r=e.pageTrackerEnabled,i=e.onReady,c=e.disableScriptLoad;if(n||g(),null==window[t]&&(window.dataLayer=window.dataLayer||[],window[t]=function(){window.dataLayer.push(arguments)}),window[t]("js",new Date),f(),r&&h(),!c){var u="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(u,"/gtag/js?id=").concat(o),u).then(function(){var e=window[t];return"function"==typeof i&&i(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),y(),b.bootstrap&&m()}var O=m,E=A,S=v.query,x=v.config,N=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=x,e.customMap=q,e.default=j,e.event=N,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)},l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n[0],a={};a="string"==typeof o?{page_path:o,page_location:window.location.href}:o,f(a)},d=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(),t=n.includes,o=n.config;window["ga-disable-".concat(o.id)]=e,Array.isArray(t)&&t.forEach(function(n){window["ga-disable-".concat(n.id)]=e})},g=function(){s(!0)},v={query:i,config:f,event:p,pageview:l,screenview:d,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},y=function(){var e=T();e.$gtag=e.prototype.$gtag=v},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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?d(t):l(t):a("To use the screenview, name your routes"):a("To use the screenview, add the appName to the plugin options")}},h=function(){var e=_();e&&function(e){var n=T(),t=k(),o=t.onBeforeTrack,a=t.onAfterTrack;e.onReady(function(t){n.nextTick().then(function(){w(t)}),e.afterEach(function(e,t){n.nextTick().then(function(){o(e,t),w(e,t),a(e,t)})})})}(e)};function m(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=k(),n=e.enabled,t=e.globalObjectName,o=e.config.id,r=e.pageTrackerEnabled,i=e.onReady,c=e.disableScriptLoad,u=_(),p=Boolean(r&&u);if(n||g(),null==window[t]&&(window.dataLayer=window.dataLayer||[],window[t]=function(){window.dataLayer.push(arguments)}),window[t]("js",new Date),p?h():f(),!c){var l="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(l,"/gtag/js?id=").concat(o),l).then(function(){var e=window[t];return"function"==typeof i&&i(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),y(),b.bootstrap&&m()}var O=m,E=A,S=v.query,x=v.config,N=v.event,L=v.pageview,B=v.screenview,M=v.customMap,q=v.time,G=v.exception,I=v.linker,P=v.purchase,R=v.set,C=v.optIn,$=v.optOut;e.bootstrap=O,e.config=x,e.customMap=M,e.default=j,e.event=N,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=B,e.set=R,e.setOptions=E,e.time=q,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.6.4", | ||
"version": "1.6.5", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Matteo Gabriele", |
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
69730
1464