From 0ff9dcc8936b3a438f9125d34e635b8b54ee280a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20E=2E=20Fern=C3=A1ndez?= Date: Tue, 13 Mar 2018 00:27:42 +0100 Subject: [PATCH] Add support for Google Analytics with global site tag (gtag.js) (#1563) For documentation see https://developers.google.com/analytics/devguides/collection/gtagjs/ and https://support.google.com/analytics/answer/7538414. --- _config.yml | 2 +- _includes/analytics-providers/google-gtag.html | 9 +++++++++ _includes/analytics.html | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 _includes/analytics-providers/google-gtag.html diff --git a/_config.yml b/_config.yml index ae4fe97..e1d8cc2 100644 --- a/_config.yml +++ b/_config.yml @@ -83,7 +83,7 @@ social: # Analytics analytics: - provider : false # false (default), "google", "google-universal", "custom" + provider : false # false (default), "google", "google-universal", "google-gtag", "custom" google: tracking_id : diff --git a/_includes/analytics-providers/google-gtag.html b/_includes/analytics-providers/google-gtag.html new file mode 100644 index 0000000..31f2a69 --- /dev/null +++ b/_includes/analytics-providers/google-gtag.html @@ -0,0 +1,9 @@ + + + diff --git a/_includes/analytics.html b/_includes/analytics.html index 5448a50..371469f 100644 --- a/_includes/analytics.html +++ b/_includes/analytics.html @@ -5,6 +5,8 @@ {% include /analytics-providers/google.html %} {% when "google-universal" %} {% include /analytics-providers/google-universal.html %} +{% when "google-gtag" %} + {% include /analytics-providers/google-gtag.html %} {% when "custom" %} {% include /analytics-providers/custom.html %} {% endcase %} -- 2.45.2