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

@analytics/google-tag-manager

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@analytics/google-tag-manager - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.5.4](https://github.com/DavidWells/analytics/compare/@analytics/google-tag-manager@0.5.3...@analytics/google-tag-manager@0.5.4) (2023-05-27)
### Bug Fixes
* missing script src ([fe8e86f](https://github.com/DavidWells/analytics/commit/fe8e86f0b441d1908a07368ccc3a3f2f6c9ae1ee))
## [0.5.3](https://github.com/DavidWells/analytics/compare/@analytics/google-tag-manager@0.5.2...@analytics/google-tag-manager@0.5.3) (2022-11-09)

@@ -8,0 +19,0 @@

2

dist/@analytics/google-tag-manager.js

@@ -66,3 +66,3 @@ var analyticsGtagManager = (function () {

if (!scriptLoaded(containerId)) {
if (!scriptLoaded(containerId, scriptSrc)) {
/* eslint-disable */

@@ -69,0 +69,0 @@ (function (w, d, s, l, i) {

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

var analyticsGtagManager=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n,a={debug:!1,containerId:null,dataLayerName:"dataLayer",dataLayer:void 0,preview:void 0,auth:void 0,execution:"async"};var o={};function i(e,t){var r=o[e];if(!r){var n=t.replace(/^https?:\/\//,"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=new RegExp(n+".*[?&]id="+e),o[e]=r}var a=document.querySelectorAll("script[src]");return!!Object.keys(a).filter((function(e){return(a[e].src||"").match(r)})).length}var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="https://www.googletagmanager.com/gtm.js";return{name:"google-tag-manager",config:t(t({},a),e),initialize:function(e){var t=e.config,a=t.containerId,o=t.dataLayerName,c=t.customScriptSrc,u=t.preview,p=t.auth,s=t.execution;if(!a)throw new Error("No google tag manager containerId defined");if(u&&!p)throw new Error("When enabling preview mode, both preview and auth parameters must be defined");var d=c||r;i(a)||(!function(e,t,r,n,a){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var o=t.getElementsByTagName(r)[0],i=t.createElement(r),c="dataLayer"!=n?"&l="+n:"",g=u?"&gtm_preview="+u+"&gtm_auth="+p+"&gtm_cookies_win=x":"";s&&(i[s]=!0),i.src="".concat(d,"?id=")+a+c+g,o.parentNode.insertBefore(i,o)}(window,document,"script",o,a),n=o,t.dataLayer=window[o])},page:function(e){var t=e.payload;e.options,e.instance;var r=e.config;void 0!==r.dataLayer&&r.dataLayer.push(t.properties)},track:function(e){var r=e.payload;e.options;var n=e.config;if(void 0!==n.dataLayer){var a=r.anonymousId,o=r.userId,i=r.properties,c=i;o&&(c.userId=o),a&&(c.anonymousId=a),i.category||(c.category="All"),n.debug&&console.log("gtag push",t({event:r.event},c)),n.dataLayer.push(t({event:r.event},c))}},loaded:function(){var t=!!n&&!(!window[n]||Array.prototype.push===window[n].push);return i(e.containerId,e.customScriptSrc||r)&&t}}};return c}();
var analyticsGtagManager=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n,a={debug:!1,containerId:null,dataLayerName:"dataLayer",dataLayer:void 0,preview:void 0,auth:void 0,execution:"async"};var o={};function i(e,t){var r=o[e];if(!r){var n=t.replace(/^https?:\/\//,"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=new RegExp(n+".*[?&]id="+e),o[e]=r}var a=document.querySelectorAll("script[src]");return!!Object.keys(a).filter((function(e){return(a[e].src||"").match(r)})).length}var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="https://www.googletagmanager.com/gtm.js";return{name:"google-tag-manager",config:t(t({},a),e),initialize:function(e){var t=e.config,a=t.containerId,o=t.dataLayerName,c=t.customScriptSrc,u=t.preview,p=t.auth,s=t.execution;if(!a)throw new Error("No google tag manager containerId defined");if(u&&!p)throw new Error("When enabling preview mode, both preview and auth parameters must be defined");var d=c||r;i(a,d)||(!function(e,t,r,n,a){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var o=t.getElementsByTagName(r)[0],i=t.createElement(r),c="dataLayer"!=n?"&l="+n:"",g=u?"&gtm_preview="+u+"&gtm_auth="+p+"&gtm_cookies_win=x":"";s&&(i[s]=!0),i.src="".concat(d,"?id=")+a+c+g,o.parentNode.insertBefore(i,o)}(window,document,"script",o,a),n=o,t.dataLayer=window[o])},page:function(e){var t=e.payload;e.options,e.instance;var r=e.config;void 0!==r.dataLayer&&r.dataLayer.push(t.properties)},track:function(e){var r=e.payload;e.options;var n=e.config;if(void 0!==n.dataLayer){var a=r.anonymousId,o=r.userId,i=r.properties,c=i;o&&(c.userId=o),a&&(c.anonymousId=a),i.category||(c.category="All"),n.debug&&console.log("gtag push",t({event:r.event},c)),n.dataLayer.push(t({event:r.event},c))}},loaded:function(){var t=!!n&&!(!window[n]||Array.prototype.push===window[n].push);return i(e.containerId,e.customScriptSrc||r)&&t}}};return c}();

@@ -65,3 +65,3 @@ 'use strict';

if (!scriptLoaded(containerId)) {
if (!scriptLoaded(containerId, scriptSrc)) {
/* eslint-disable */

@@ -68,0 +68,0 @@ (function (w, d, s, l, i) {

@@ -63,3 +63,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

if (!scriptLoaded(containerId)) {
if (!scriptLoaded(containerId, scriptSrc)) {
/* eslint-disable */

@@ -66,0 +66,0 @@ (function (w, d, s, l, i) {

{
"name": "@analytics/google-tag-manager",
"version": "0.5.3",
"version": "0.5.4",
"description": "Google tag manager plugin for 'analytics' module",

@@ -55,3 +55,3 @@ "projectMeta": {

},
"gitHead": "6aeed790273b15dd19952b4585880f877467cab2"
"gitHead": "587a2ec0e20db0b24151fd69626d0fa19ac22131"
}
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