From dfa273c1a4d9e82e5b6961e7782e43c06b6657f8 Mon Sep 17 00:00:00 2001 From: Harry Khanna Date: Fri, 6 Jul 2018 11:31:25 -0400 Subject: [PATCH] Add gtag support for Google Analytics (#374) --- _config.yml | 3 +++ _includes/gtag.html | 11 +++++++++++ _includes/head.html | 1 + 3 files changed, 15 insertions(+) create mode 100644 _includes/gtag.html diff --git a/_config.yml b/_config.yml index ad3880f..a779d72 100644 --- a/_config.yml +++ b/_config.yml @@ -103,6 +103,9 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # --- Web Statistics Section --- # +# Fill in your Google Analytics gtag.js ID to track your website using gtag +#gtag: "" + # Fill in your Google Analytics ID to track your website using GA #google_analytics: "" diff --git a/_includes/gtag.html b/_includes/gtag.html new file mode 100644 index 0000000..a7f4988 --- /dev/null +++ b/_includes/gtag.html @@ -0,0 +1,11 @@ +{% if site.gtag %} + + + +{% endif %} diff --git a/_includes/head.html b/_includes/head.html index f67974f..9aa6680 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -13,6 +13,7 @@ + {% include gtag.html %} {% include gtm_head.html %} {% if layout.common-ext-css %}