Socket
Book a DemoInstallSign in
Socket

google-tag-manager-rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-tag-manager-rails

0.1.3
bundlerRubygems
Version published
Maintainers
1
Created
Source

Installation

Add the following to your Gemfile:

gem 'google-tag-manager-rails'

Then run:

bundle install

Example Configuration

In config/environments/production.rb :

GoogleTagManager.gtm_id = "GTM-XXXX" # Where GTM-XXXX is your container ID from Google Tag Manager

In app/views/layouts/application.html.erb:

<body>
  <%= google_tag_manager %>
  ...

Per environment config

google-tag-manager-rails will only write out a tag if GoogleTagManager.gtm_id is set. If you don't set the value in your development, testing, or staging environments, no tags will be written.

If you'd like to add them, in config/environments/{development,staging}.rb :

GoogleTagManager.gtm_id = "GTM-XXXX" # Where GTM-XXXX is your container ID from Google Tag Manager

FAQs

Package last updated on 08 Oct 2012

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.