From a6c28e1b8d85f5ba3b6af8469d0a1615937da572 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Wed, 22 Jan 2020 20:51:35 +0300 Subject: [PATCH] Fix #7: add ga internal template --- README.md | 1 + layouts/partials/head.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 31ea7b2..c6f70ab 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ author: "" theme: "anubis" paginate: 10 disqusShortname: yourdiscussshortname +googleAnalytics: UA-123-45 menu: main: diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1474b76..49d96c1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -38,4 +38,7 @@ - \ No newline at end of file + +{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} + {{ template "_internal/google_analytics_async.html" . }} +{{ end }} \ No newline at end of file