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

@r/google-tag-manager

Package Overview
Dependencies
Maintainers
13
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@r/google-tag-manager

A wrapper for google tag manager with a builtin jail.

  • 0.2.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
13
Created
Source

r/google-tag-manager

A wrapper for google tag manager with a builtin jail.

Change Log

v0.0.0

Initial release

v0.1.0
v0.2.0
  • Include additional location / referrer data in default payload.
v0.2.2
  • Update @r/frames dependency
v0.2.3
  • Queue events until to loaded event returns from jail.
v0.2.6
  • Release assets are packaged with the build, rather than compiled upon install
v0.2.7
  • Updates @r/frames so that this package will not break server environments

Installation

yarn add @r/google-tag-manager -s

Usage example

import * as gtm from '@r/google-tag-manager';

// initialize gtm
gtm.setup({
  containerId: 'GTM-XXXXXX',
  host: 'redditmedia.com',
  payload: {
    user: 1234,
    subreddit: 'WhatsSnoo',
  },
});

// trigger events (payload optional)
gtm.trigger('pageview', {
  subreddit: 'announcements',
});
gtm.trigger('loggedout');

TODO

  1. Add tests
  2. Convert to typescript

FAQs

Package last updated on 17 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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