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

gtm-event-tracker

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gtm-event-tracker - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

19

dist/data-layer/data-layer-types.d.ts

@@ -6,20 +6,1 @@ /**

export declare type EventProperties = Record<string, string | number>;
/**
* The type-safe and recommended way for you to interact with `window.dataLayer`.
* @public
*/
export declare type DataLayerModule = Readonly<{
/**
* Pushes an event to `window.dataLayer`.
* @public
*/
addEvent: (payload: EventProperties) => void;
/**
* Asserts `window.dataLayer` is available.
*
* This array is injected in the `window` by Google Tag Manager, so you
* just need to have this dependency installed correctly.
* @public
*/
assertIsAvailable: () => void;
}>;

5

dist/data-layer/data-layer.d.ts

@@ -1,2 +0,3 @@

import type { DataLayerModule } from './data-layer-types';
export declare const dataLayer: DataLayerModule;
import type { DataLayerFunctions } from './data-layer-types';
export declare function createDataLayerModule(): DataLayerFunctions;
export declare const dataLayer: DataLayerFunctions;

4

dist/data-layer/data-layer.js

@@ -5,6 +5,2 @@ "use strict";

const data_layer_error_1 = require("./data-layer-error");
/**
* Create the Data Layer module.
* @internal
*/
function createDataLayerModule() {

@@ -11,0 +7,0 @@ function addEvent(payload) {

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "1.2.3",
"version": "1.2.4",
"description": "A type-safe, reusable, and flexible way for triggering Google Tag Manager track events.",

@@ -24,3 +24,3 @@ "keywords": [

"clean": "rimraf dist temp *.tsbuildinfo",
"dev": "yarn build --watch --preserveWatchOutput",
"dev": "npm-run-all 'build:ts --watch --preserveWatchOutput'",
"build": "npm-run-all clean build:ts",

@@ -27,0 +27,0 @@ "build:ts": "tsc --project tsconfig.build.json",

@@ -8,9 +8,8 @@ /**

/**
* The type-safe and recommended way for you to interact with `window.dataLayer`.
* @public
* The type-safe and recommended way to interact with `window.dataLayer`.
* @internal
*/
export type DataLayerModule = Readonly<{
export type DataLayerFunctions = Readonly<{
/**
* Pushes an event to `window.dataLayer`.
* @public
*/

@@ -24,13 +23,4 @@ addEvent: (payload: EventProperties) => void

* just need to have this dependency installed correctly.
* @public
*/
assertIsAvailable: () => void
}>
/**
* Options for customizing the Data Layer module.
* @internal
*/
export type DataLayerModuleOptions = {
debug?: boolean
}

@@ -6,9 +6,5 @@ import {

} from './data-layer-error'
import type { EventProperties, DataLayerModule } from './data-layer-types'
import type { EventProperties, DataLayerFunctions } from './data-layer-types'
/**
* Create the Data Layer module.
* @internal
*/
export function createDataLayerModule(): DataLayerModule {
export function createDataLayerModule(): DataLayerFunctions {
function addEvent(payload: EventProperties) {

@@ -34,2 +30,2 @@ window.dataLayer.push(payload)

export const dataLayer: DataLayerModule = createDataLayerModule()
export const dataLayer: DataLayerFunctions = createDataLayerModule()

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