Jekyll Google Tag Manager Plugin

A Jekyll plugin to insert Google Tag Manager tags into the head and body of your site.

CircleCI Build Status Gem Version Code Coverage

Installation

Add the plugin to your site's Gemfile:

group :jekyll_plugins do
  gem 'jekyll-google-tag-manager'
end

And then execute:

$ bundle install

Usage

You must specify a single GTM container in your site's _config.yml.

google:
  tag_manager:
    container_id: GTM-NNNNNNN

Add the following right after the opening of the <head> tag in your site template(s):

{% gtm head %}

Add the following right after the opening of the <body> tag in your site template(s):

{% gtm body %}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/t-richards/jekyll-google-tag-manager.

License

The gem is available as open source under the terms of the MIT License.