From ce91352dd534134a11d03011036f8e45d753464d Mon Sep 17 00:00:00 2001 From: Simon Gemmell Date: Thu, 10 Aug 2017 20:10:20 +1000 Subject: [PATCH] Add google tag manager --- exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3dbf59e..7c2c8a0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -43,6 +43,9 @@ paginate = 5 # Format dates with Go's time formatting date_format = "Mon Jan 02, 2006" + # Google Tag Manager id + # googleTagManager = "XXXZZZYYY" + # verification string for Google Webmaster Tools #google_verify_meta = "BAi57DROASu4b2mkVNA_EyUsobfA7Mq8BmSg7Rn-Zp9" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b1db42d..613d571 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,6 +2,16 @@ + {{ if .Site.Params.googleTagManager }} + + + + {{ end }} + {{ partial "head-meta.html" . }} {{ block "schema-dot-org" . }} @@ -30,7 +40,12 @@ - + {{ if .Site.Params.googleTagManager }} + + + + {{ end }}