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

gulp-gtm-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-gtm-plugin

Add Google Tag Manager support to your web project.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Gulp Google Tag Manager Plugin

So that is basically webpack-google-tag-manager-plugin, but fixed some bugs and made it to use with gulp.

Installation

$ npm i gulp-gtm-plugin -D
$ yarn add gulp-gtm-plugin -D

How to use

const gulp = require('gulp')
const gtm  = require('gulp-gtm-plugin')

gulp.task('html', () =>
  gulp.src('./index.html')
  .pipe(gtm({
      id: 'GTM-1234'
  }))
  .pipe(gulp.dest('./'))
)

Default options

gtm({
  id: '',
  events: {},
  dataLayer: {},
  dataLayerName: 'dataLayer',
  auth: '',
  preview: '',
  cookiesWin: '', // Add `gtm_cookies_win` query to url (cookiesWin: 'x' => gtm_cookies_win=x)
})

Keywords

FAQs

Package last updated on 11 Oct 2021

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