Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-gtag

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-gtag - npm Package Compare versions

Comparing version 1.12.0 to 1.12.1

4

dist/vue-gtag.esm.js

@@ -403,7 +403,7 @@ function _typeof(obj) {

Router.onReady(function (current) {
Router.onReady(function () {
Vue.nextTick().then(function () {
api.config(config.params);
trackPage({
to: current
to: Router.currentRoute
});

@@ -410,0 +410,0 @@ });

@@ -407,7 +407,7 @@ 'use strict';

Router.onReady(function (current) {
Router.onReady(function () {
Vue.nextTick().then(function () {
api.config(config.params);
trackPage({
to: current
to: Router.currentRoute
});

@@ -414,0 +414,0 @@ });

@@ -409,7 +409,7 @@ (function (global, factory) {

Router.onReady(function (current) {
Router.onReady(function () {
Vue.nextTick().then(function () {
api.config(config.params);
trackPage({
to: current
to: Router.currentRoute
});

@@ -416,0 +416,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}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var a=function(){};function i(e){console.warn("[vue-gtag] "+e)}function c(e){return e&&"object"===n(e)&&!Array.isArray(e)}function p(){var e,n=j(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)}var u,f,l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=j(),r=o.config,a=o.includes;p.apply(void 0,["config",r.id].concat(n)),Array.isArray(a)&&a.forEach((function(e){p.apply(void 0,["config",e.id].concat(n))}))},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.defaultGroupName,r=t.includes,a=n;r&&null==a.send_to&&(a.send_to=r.map((function(e){return e.id})).concat(o)),p("event",e,a)},g=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n[0],r={};null==(r="string"==typeof o?{page_path:o,page_location:window.location.href}:o).send_page_view&&(r.send_page_view=!0),d("page_view",r)},s=function(){for(var e=j(),n=e.appName,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var a=o[0],i={};null==(i="string"==typeof a?{screen_name:a}:a).app_name&&(i.app_name=n),null==i.send_page_view&&(i.send_page_view=!0),d("screen_view",i)},v=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=j(),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}))},m=function(){v(!0)},y={query:p,config:l,event:d,pageview:g,screenview:s,customMap:function(e){l({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.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];d.apply(void 0,["exception"].concat(n))},linker:function(e){l("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.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];d.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];p.apply(void 0,["set"].concat(n))},optIn:function(){v(!1)},optOut:m},w=function(){var e=P();e.$gtag=e.prototype.$gtag=y},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),o=t.pageTrackerTemplate,r=t.pageTrackerScreenviewEnabled,a=t.pageTrackerUseFullPath,i=t.appName,c=o(e,n);return c||(r?{app_name:i,screen_name:e.name}:{page_title:e.name,page_path:a?e.fullPath:e.path,page_location:window.location.href})},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.to,t=void 0===n?{}:n,o=e.from,a=void 0===o?{}:o,c=e.params,p=void 0===c?{}:c,u=j(),f=u.pageTrackerSkipSamePath,l=u.pageTrackerScreenviewEnabled;if(!f||t.path!==a.path){var d=r(r({},h(t,a)),p);!l||d.app_name?!l||d.screen_name?l?s(d):g(d):i("To use the screenview, name your routes"):i("To use the screenview, add the appName to the plugin options")}},O=function(){var e=S();e&&function(e){var n=P(),t=j(),o=t.onBeforeTrack,r=t.onAfterTrack,a=t.config;e.onReady((function(t){n.nextTick().then((function(){y.config(a.params),b({to:t})})),e.afterEach((function(e,t){n.nextTick().then((function(){o(e,t),b({to:e,from:t}),r(e,t)}))}))}))}(e)};function _(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=j(),n=e.customResourceURL,t=e.customPreconnectOrigin,o=e.enabled,r=e.globalObjectName,a=e.globalDataLayerName,i=e.config,c=e.pageTrackerEnabled,p=e.onReady,u=e.deferScriptLoad,f=e.disableScriptLoad,l=S(),d=Boolean(c&&l);if(o||m(),null==window[r]&&(window[a]=window[a]||[],window[r]=function(){window[a].push(arguments)}),window[r]("js",new Date),d?O():y.config(i.params),!f)return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(t,o){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");if(a.async=!0,a.src=e,a.charset="utf-8",a.defer=n.defer,n.preconnectOrigin){var i=document.createElement("link");i.href=n.preconnectOrigin,i.rel="preconnect",r.appendChild(i)}r.appendChild(a),a.onload=t,a.onerror=o}))}("".concat(n,"?id=").concat(i.id,"&l=").concat(a),{preconnectOrigin:t,defer:u}).then((function(){var e=window[r];return"function"==typeof p&&p(e),e})).catch((function(e){return e}))}}var k={customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,deferScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",globalDataLayerName:"dataLayer",pageTrackerUseFullPath:!1,pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,pageTrackerSkipSamePath:!0,defaultGroupName:"default",includes:null,appName:null,config:{id:null,params:{send_page_view:!1}}},j=function(){return k},T=function(e){return function e(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];if(!r.length)return n;var i=r.shift();if(c(n)&&c(i)){for(var p in i)c(i[p])?(n[p]||Object.assign(n,t({},p,{})),e(n[p],i[p])):Object.assign(n,t({},p,i[p]));return e.apply(void 0,[n].concat(r))}}(k,e)},P=function(){return u},S=function(){return f};function A(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,T(n),w(),k.bootstrap&&_()}var E=_,N=T,x=y.query,L=y.config,D=y.event,R=y.pageview,B=y.screenview,M=y.customMap,U=y.time,q=y.exception,G=y.linker,I=y.purchase,C=y.set,F=y.optIn,$=y.optOut,V=y.refund;e.bootstrap=E,e.config=L,e.customMap=M,e.default=A,e.event=D,e.exception=q,e.install=A,e.linker=G,e.optIn=F,e.optOut=$,e.pageview=R,e.purchase=I,e.query=x,e.refund=V,e.screenview=B,e.set=C,e.setOptions=N,e.time=U,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}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var a=function(){};function i(e){console.warn("[vue-gtag] "+e)}function c(e){return e&&"object"===n(e)&&!Array.isArray(e)}function p(){var e,n=j(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)}var u,f,l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r=j(),o=r.config,a=r.includes;p.apply(void 0,["config",o.id].concat(n)),Array.isArray(a)&&a.forEach((function(e){p.apply(void 0,["config",e.id].concat(n))}))},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),r=t.defaultGroupName,o=t.includes,a=n;o&&null==a.send_to&&(a.send_to=o.map((function(e){return e.id})).concat(r)),p("event",e,a)},g=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r=n[0],o={};null==(o="string"==typeof r?{page_path:r,page_location:window.location.href}:r).send_page_view&&(o.send_page_view=!0),d("page_view",o)},s=function(){for(var e=j(),n=e.appName,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var a=r[0],i={};null==(i="string"==typeof a?{screen_name:a}:a).app_name&&(i.app_name=n),null==i.send_page_view&&(i.send_page_view=!0),d("screen_view",i)},v=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=j(),t=n.includes,r=n.config;window["ga-disable-".concat(r.id)]=e,Array.isArray(t)&&t.forEach((function(n){window["ga-disable-".concat(n.id)]=e}))},m=function(){v(!0)},y={query:p,config:l,event:d,pageview:g,screenview:s,customMap:function(e){l({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.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];d.apply(void 0,["exception"].concat(n))},linker:function(e){l("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.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];d.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];p.apply(void 0,["set"].concat(n))},optIn:function(){v(!1)},optOut:m},w=function(){var e=P();e.$gtag=e.prototype.$gtag=y},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=j(),r=t.pageTrackerTemplate,o=t.pageTrackerScreenviewEnabled,a=t.pageTrackerUseFullPath,i=t.appName,c=r(e,n);return c||(o?{app_name:i,screen_name:e.name}:{page_title:e.name,page_path:a?e.fullPath:e.path,page_location:window.location.href})},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.to,t=void 0===n?{}:n,r=e.from,a=void 0===r?{}:r,c=e.params,p=void 0===c?{}:c,u=j(),f=u.pageTrackerSkipSamePath,l=u.pageTrackerScreenviewEnabled;if(!f||t.path!==a.path){var d=o(o({},h(t,a)),p);!l||d.app_name?!l||d.screen_name?l?s(d):g(d):i("To use the screenview, name your routes"):i("To use the screenview, add the appName to the plugin options")}},O=function(){var e=S();e&&function(e){var n=P(),t=j(),r=t.onBeforeTrack,o=t.onAfterTrack,a=t.config;e.onReady((function(){n.nextTick().then((function(){y.config(a.params),b({to:e.currentRoute})})),e.afterEach((function(e,t){n.nextTick().then((function(){r(e,t),b({to:e,from:t}),o(e,t)}))}))}))}(e)};function _(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e=j(),n=e.customResourceURL,t=e.customPreconnectOrigin,r=e.enabled,o=e.globalObjectName,a=e.globalDataLayerName,i=e.config,c=e.pageTrackerEnabled,p=e.onReady,u=e.deferScriptLoad,f=e.disableScriptLoad,l=S(),d=Boolean(c&&l);if(r||m(),null==window[o]&&(window[a]=window[a]||[],window[o]=function(){window[a].push(arguments)}),window[o]("js",new Date),d?O():y.config(i.params),!f)return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(t,r){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");if(a.async=!0,a.src=e,a.charset="utf-8",a.defer=n.defer,n.preconnectOrigin){var i=document.createElement("link");i.href=n.preconnectOrigin,i.rel="preconnect",o.appendChild(i)}o.appendChild(a),a.onload=t,a.onerror=r}))}("".concat(n,"?id=").concat(i.id,"&l=").concat(a),{preconnectOrigin:t,defer:u}).then((function(){var e=window[o];return"function"==typeof p&&p(e),e})).catch((function(e){return e}))}}var k={customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,deferScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",globalDataLayerName:"dataLayer",pageTrackerUseFullPath:!1,pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,pageTrackerSkipSamePath:!0,defaultGroupName:"default",includes:null,appName:null,config:{id:null,params:{send_page_view:!1}}},j=function(){return k},T=function(e){return function e(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(!o.length)return n;var i=o.shift();if(c(n)&&c(i)){for(var p in i)c(i[p])?(n[p]||Object.assign(n,t({},p,{})),e(n[p],i[p])):Object.assign(n,t({},p,i[p]));return e.apply(void 0,[n].concat(o))}}(k,e)},P=function(){return u},S=function(){return f};function A(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,T(n),w(),k.bootstrap&&_()}var E=_,N=T,x=y.query,L=y.config,R=y.event,D=y.pageview,B=y.screenview,M=y.customMap,U=y.time,q=y.exception,G=y.linker,I=y.purchase,C=y.set,F=y.optIn,$=y.optOut,V=y.refund;e.bootstrap=E,e.config=L,e.customMap=M,e.default=A,e.event=R,e.exception=q,e.install=A,e.linker=G,e.optIn=F,e.optOut=$,e.pageview=D,e.purchase=I,e.query=x,e.refund=V,e.screenview=B,e.set=C,e.setOptions=N,e.time=U,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.12.0",
"version": "1.12.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Matteo Gabriele",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc