From 09e037d535a833afcddc3c3b87bdb31e37b12c65 Mon Sep 17 00:00:00 2001 From: Cagri Sarigoz Date: Mon, 9 Jan 2017 07:43:53 +0300 Subject: [PATCH] Add Google Tag Manager Integration (#157) --- _config.yml | 3 +++ _includes/gtm_body.html | 6 ++++++ _includes/gtm_head.html | 9 +++++++++ _includes/head.html | 2 ++ _layouts/base.html | 2 ++ 5 files changed, 22 insertions(+) create mode 100644 _includes/gtm_body.html create mode 100644 _includes/gtm_head.html diff --git a/_config.yml b/_config.yml index 2473872..d7e267e 100644 --- a/_config.yml +++ b/_config.yml @@ -95,6 +95,9 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # Fill in your Google Analytics ID to track your website using GA #google_analytics: "" +# Google Tag Manager ID +#gtm: "" + # Facebook App ID # fb_app_id: "" diff --git a/_includes/gtm_body.html b/_includes/gtm_body.html new file mode 100644 index 0000000..0d9ae02 --- /dev/null +++ b/_includes/gtm_body.html @@ -0,0 +1,6 @@ +{% if site.gtm %} + + + +{% endif %} \ No newline at end of file diff --git a/_includes/gtm_head.html b/_includes/gtm_head.html new file mode 100644 index 0000000..ded5d41 --- /dev/null +++ b/_includes/gtm_head.html @@ -0,0 +1,9 @@ +{% if site.gtm %} + + + +{% endif %} \ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html index 7b2b58b..fa6d633 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -13,6 +13,8 @@ + {% include gtm_head.html %} + {% if layout.common-ext-css %} {% for css in layout.common-ext-css %} diff --git a/_layouts/base.html b/_layouts/base.html index c7a17a2..fc28fb0 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -20,6 +20,8 @@ common-js: {% include head.html %} + + {% include gtm_body.html %} {% include nav.html %}