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.4 to 0.5.5

8

CHANGELOG.md

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

## [0.5.5](https://github.com/DavidWells/analytics/compare/@analytics/google-tag-manager@0.5.4...@analytics/google-tag-manager@0.5.5) (2023-06-16)
**Note:** Version bump only for package @analytics/google-tag-manager
## [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)

@@ -8,0 +16,0 @@

2

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

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

if (config.debug) {
console.log('gtag push', _objectSpread({
console.log('dataLayer push', _objectSpread({
event: payload.event

@@ -130,0 +130,0 @@ }, formattedPayload));

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

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

if (config.debug) {
console.log('gtag push', _objectSpread({
console.log('dataLayer push', _objectSpread({
event: payload.event

@@ -129,0 +129,0 @@ }, formattedPayload));

@@ -124,3 +124,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 (config.debug) {
console.log('gtag push', _objectSpread({
console.log('dataLayer push', _objectSpread({
event: payload.event

@@ -127,0 +127,0 @@ }, formattedPayload));

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

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

},
"gitHead": "587a2ec0e20db0b24151fd69626d0fa19ac22131"
"gitHead": "698def152b6eb352d0421442bd95329d03fcdd9d"
}
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