Comparing version 1.6.3 to 1.6.4
@@ -162,3 +162,3 @@ function _typeof(obj) { | ||
event("page_view", params); | ||
config(params); | ||
}); | ||
@@ -358,3 +358,3 @@ | ||
globalObjectName = _getOptions.globalObjectName, | ||
config = _getOptions.config, | ||
id = _getOptions.config.id, | ||
pageTrackerEnabled = _getOptions.pageTrackerEnabled, | ||
@@ -377,2 +377,3 @@ onReady = _getOptions.onReady, | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
@@ -388,3 +389,3 @@ if (pageTrackerEnabled) { | ||
var domain = "https://www.googletagmanager.com"; | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(config.id); | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(id); | ||
return loadScript(resource, domain).then(function () { | ||
@@ -391,0 +392,0 @@ var library = window[globalObjectName]; |
@@ -166,3 +166,3 @@ 'use strict'; | ||
event("page_view", params); | ||
config(params); | ||
}); | ||
@@ -362,3 +362,3 @@ | ||
globalObjectName = _getOptions.globalObjectName, | ||
config = _getOptions.config, | ||
id = _getOptions.config.id, | ||
pageTrackerEnabled = _getOptions.pageTrackerEnabled, | ||
@@ -381,2 +381,3 @@ onReady = _getOptions.onReady, | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
@@ -392,3 +393,3 @@ if (pageTrackerEnabled) { | ||
var domain = "https://www.googletagmanager.com"; | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(config.id); | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(id); | ||
return loadScript(resource, domain).then(function () { | ||
@@ -395,0 +396,0 @@ var library = window[globalObjectName]; |
@@ -168,3 +168,3 @@ (function (global, factory) { | ||
event("page_view", params); | ||
config(params); | ||
}); | ||
@@ -364,3 +364,3 @@ | ||
globalObjectName = _getOptions.globalObjectName, | ||
config = _getOptions.config, | ||
id = _getOptions.config.id, | ||
pageTrackerEnabled = _getOptions.pageTrackerEnabled, | ||
@@ -383,2 +383,3 @@ onReady = _getOptions.onReady, | ||
window[globalObjectName]("js", new Date()); | ||
config(); | ||
@@ -394,3 +395,3 @@ if (pageTrackerEnabled) { | ||
var domain = "https://www.googletagmanager.com"; | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(config.id); | ||
var resource = "".concat(domain, "/gtag/js?id=").concat(id); | ||
return loadScript(resource, domain).then(function () { | ||
@@ -397,0 +398,0 @@ var library = window[globalObjectName]; |
@@ -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,p("page_view",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,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),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.id),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)},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})}); | ||
//# sourceMappingURL=vue-gtag.umd.min.js.map |
{ | ||
"name": "vue-gtag", | ||
"description": "Global Site Tag (gtag.js) plugin for Vue", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"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
69159
1455