Socket
Socket
Sign inDemoInstall

webpack-google-tag-manager-plugin

Package Overview
Dependencies
429
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    webpack-google-tag-manager-plugin

A clean and easy way to add Google Tag Manager support to your web project.


Version published
Weekly downloads
166
decreased by-40.93%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Webpack Google Tag Manager Plugin

A clean and easy way to add Google Tag Manager support to your web project.

npm npm

Installation

  npm i --save-dev webpack-google-tag-manager-plugin
  yarn add --dev webpack-google-tag-manager-plugin

Examples

Webpack basic configuration for setting up the plugin

import webpack from 'webpack'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import GoogleTagManagerPlugin from 'webpack-google-tag-manager-plugin'

module.exports = {
    ...
    plugins: [
        new HtmlWebpackPlugin({
          ...
        }),
        new GoogleTagManagerPlugin({
            id: 'your-container-id',
        }),
    ],
}

Webpack configuration for making use of your environments

import webpack from 'webpack'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import GoogleTagManagerPlugin from 'webpack-google-tag-manager-plugin'

module.exports = {
    ...
    plugins: [
        new HtmlWebpackPlugin({
          ...
        }),
        new GoogleTagManagerPlugin({
            id: 'your-container-id',
            auth: 'your-auth-value',
            preview: 'your-environment-value',
        }),
    ],
}

License

Webpack Google Tag Manager Plugin is published under MIT License.

Collaboration

If you have any questions, please contact me via e-mail. For issues, please open an issue!

Keywords

FAQs

Last updated on 22 Oct 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc