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

tagmanager-wrap

Package Overview
Dependencies
Maintainers
8
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tagmanager-wrap

Wrapping Google tagmanager and adding some helpers to him

  • 4.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
8
Weekly downloads
 
Created
Source

TagManager Wrap

Build Status Maintainability Test Coverage

Wrapping Google TagManager and adding some helpers to it.

Until v3.2.1

  • This script appends automatically the googleTagManager script.
  • It also adds an iframe inside a noscript tag for non-js fallback

After v3.2.1

  • This script don't append the GTM script automatically anymore. For this new version, you must implement GTM snippet following the official instructions.
  • Also, the noscript tag fallback isn't added anymore, because this tag is a fallback for disabled js on browsers, so there's no reason to add it through JS, because it won't work. To add this feature properly, follow the official instructions.

Documentation

See live here https://getninjas.github.io/tagmanager-wrap

Install

npm i tagmanager-wrap --save

yarn add tagmanager-wrap

Demo

npm run demo

yarn demo

Usage

You can use it via:

  • GLOBAL variabel
  • CommonJs
  • AMD
  • ES6 Module
Methods
  • prependExperiment(experiment)
  • eventCategory(event, infos)
  • custom(obj)
  • bindEvents() - gets all elements from the page that contains [data-gtm-event="ga-event"] and adds a click event

Keywords

FAQs

Package last updated on 02 Dec 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