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.1.0 to 1.1.1

2

dist/vue-gtag.js

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["vue-gtag"]=n():e["vue-gtag"]=n()}("undefined"!=typeof self?self:this,(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function o(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){return(r="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)}t.r(n);var a=function(){};function i(e,n){console.warn("[vue-gtag] "+e),n&&n.stack&&console.warn(n.stack)}function c(e){return e&&"object"===r(e)&&!Array.isArray(e)}var u,f,p=function(){var e,n=A(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)},l=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=A(),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=A(),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)},s=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["page_view"].concat(n))},g=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["screen_view"].concat(n))},y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=A(),t=n.config;window["ga-disable-".concat(t.id)]=e},v=function(){y(!0)},w={query:p,config:l,event:d,pageview:s,screenview:g,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(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];d.apply(void 0,["linker"].concat(n))},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))},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(){y(!1)},optOut:v},b=function(){var e=O();e.$gtag=e.prototype.$gtag=w},m=function(e){var n=A(),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=A(),r=o.pageTrackerTemplate,a=o.pageTrackerScreenviewEnabled,c=o.appName,u=r(e,n);t=u||(a?{app_name:c,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href}),!a||t.app_name?!a||t.screen_name?a?g(t):s(t):i("To use the screenview, name your routes"):i("To use the screenview, add the appName to the plugin options")}}(e,n),o(e,n)}))}))},h=function(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e,n=A(),t=n.enabled,o=n.globalObjectName,r=n.config,a=r.id,c=r.params,u=n.includes,f=n.pageTrackerEnabled,p=n.onReady,l=n.disableScriptLoad;if(t||v(),null==window[o]&&(window.dataLayer=window.dataLayer||[],window[o]=function(){window.dataLayer.push(arguments)}),window[o]("js",new Date),c?window[o]("config",a,c):window[o]("config",a),Array.isArray(u)&&u.forEach((function(e){e.params?window[o]("config",e.id,e.params):window[o]("config",e.id)})),f&&(e=T())&&m(e),!l){var d,s="https://www.googletagmanager.com/gtag/js?id=".concat(a);return(d=s,new Promise((function(e,n){var t=document.head,o=document.createElement("script");o.src=d,o.setAttribute("rel","preconnect"),o.setAttribute("async",!0),o.charset="utf-8",t.appendChild(o),o.onload=e,o.onerror=n}))).then((function(){var e=window[o];return"function"==typeof p&&p(e),e})).catch((function(e){return i("Ops! Something happened and gtag.js couldn't be loaded",e),e}))}}},j={pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,defaultGroupName:"default",includes:null,config:null},A=function(){return j},_=function(e){return function e(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];if(!r.length)return n;var i=r.shift();if(c(n)&&c(i)){for(var u in i)c(i[u])?(n[u]||Object.assign(n,o({},u,{})),e(n[u],i[u])):Object.assign(n,o({},u,i[u]));return e.apply(void 0,[n].concat(r))}}(j,e)},O=function(){return u},T=function(){return f};t.d(n,"bootstrap",(function(){return S})),t.d(n,"setOptions",(function(){return k}));n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,_(n),b(),j.bootstrap&&h()};var S=h,k=_}])}));
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["vue-gtag"]=n():e["vue-gtag"]=n()}("undefined"!=typeof self?self:this,(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function o(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){return(r="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)}t.r(n);var a=function(){};function i(e,n){console.warn("[vue-gtag] "+e),n&&n.stack&&console.warn(n.stack)}function c(e){return e&&"object"===r(e)&&!Array.isArray(e)}var u,f,p=function(){var e,n=_(),t=n.globalObjectName;"undefined"!=typeof window&&(e=window)[t].apply(e,arguments)},d=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=_(),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))}))},l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=_(),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)},s=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];l.apply(void 0,["page_view"].concat(n))},g=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];l.apply(void 0,["screen_view"].concat(n))},y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=_(),t=n.config;window["ga-disable-".concat(t.id)]=e},v=function(){y(!0)},w={query:p,config:d,event:l,pageview:s,screenview:g,customMap:function(e){d({custom_map:e})},time:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];l.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];l.apply(void 0,["exception"].concat(n))},linker:function(e){d("linker",e)},purchase:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];l.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];p.apply(void 0,["set"].concat(n))},optIn:function(){y(!1)},optOut:v},b=function(){var e=O();e.$gtag=e.prototype.$gtag=w},m=function(e){var n=_(),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=_(),r=o.pageTrackerTemplate,a=o.pageTrackerScreenviewEnabled,c=o.appName,u=r(e,n);t=u||(a?{app_name:c,screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href}),!a||t.app_name?!a||t.screen_name?a?g(t):s(t):i("To use the screenview, name your routes"):i("To use the screenview, add the appName to the plugin options")}}(e,n),o(e,n)}))}))},h=function(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e,n=_(),t=n.enabled,o=n.globalObjectName,r=n.config,a=r.id,c=r.params,u=n.includes,f=n.pageTrackerEnabled,p=n.onReady,d=n.disableScriptLoad;if(t||v(),null==window[o]&&(window.dataLayer=window.dataLayer||[],window[o]=function(){window.dataLayer.push(arguments)}),window[o]("js",new Date),c?window[o]("config",a,c):window[o]("config",a),Array.isArray(u)&&u.forEach((function(e){e.params?window[o]("config",e.id,e.params):window[o]("config",e.id)})),f&&(e=T())&&m(e),!d){var l,s="https://www.googletagmanager.com/gtag/js?id=".concat(a);return(l=s,new Promise((function(e,n){var t=document.head,o=document.createElement("script");o.src=l,o.setAttribute("rel","preconnect"),o.setAttribute("async",!0),o.charset="utf-8",t.appendChild(o),o.onload=e,o.onerror=n}))).then((function(){var e=window[o];return"function"==typeof p&&p(e),e})).catch((function(e){return i("Ops! Something happened and gtag.js couldn't be loaded",e),e}))}}},j={pageTrackerTemplate:a,onBeforeTrack:a,onAfterTrack:a,onReady:a,enabled:!0,disableScriptLoad:!1,bootstrap:!0,globalObjectName:"gtag",pageTrackerEnabled:!0,pageTrackerScreenviewEnabled:!1,defaultGroupName:"default",includes:null,config:null},_=function(){return j},A=function(e){return function e(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];if(!r.length)return n;var i=r.shift();if(c(n)&&c(i)){for(var u in i)c(i[u])?(n[u]||Object.assign(n,o({},u,{})),e(n[u],i[u])):Object.assign(n,o({},u,i[u]));return e.apply(void 0,[n].concat(r))}}(j,e)},O=function(){return u},T=function(){return f};t.d(n,"bootstrap",(function(){return S})),t.d(n,"setOptions",(function(){return k}));n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;u=e,f=t,A(n),b(),j.bootstrap&&h()};var S=h,k=A}])}));
{
"name": "vue-gtag",
"description": "Global Site Tag (gtag.js) plugin for Vue",
"version": "1.1.0",
"version": "1.1.1",
"author": {

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

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