Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 763 Bytes

readme.md

File metadata and controls

32 lines (20 loc) · 763 Bytes

Kirby Google Tag Manager snippet

Plugin which adds the Google Tag Manager snippets to your Kirby CMS website.

Installation

Put the kirby-gtm folder in your site/plugins folder.

Usage

Add the snippet as close to the opening <head> tag as possible:

<?php snippet('google-tag-manager') ?>

Add the snippet immediately after the <body> tag as possible:

<?php snippet('google-tag-manager-noscript') ?>

💡 Don't forget to set your property ID. If you don't set a property ID (or if it's empty), the snippet won't have any output.

Kirby configurable options

Set your Google Tag Manager property ID, e.g. GTM-XXXX in the config file:

'bvdputte.gtm.propId' => "GTM-123456",