From a5516c46626d19d37d4b7b5d54afa2825f2ce348 Mon Sep 17 00:00:00 2001 From: Ketouem Date: Thu, 15 Sep 2022 17:51:13 +0200 Subject: [PATCH] Google analytics integration --- README.md | 3 ++- layouts/partials/google-analytics.html | 9 +++++++++ layouts/partials/header.html | 12 ++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/google-analytics.html diff --git a/README.md b/README.md index 125127d..69677b7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Hugo UILite portfolio theme is designed especially for designers and developers - Contact Form - Social links - Good SEO +- Google Analytics Integration ### Pro version also includes @@ -29,4 +30,4 @@ Hugo UILite portfolio theme is designed especially for designers and developers - [Register](https://formspree.io/) - [Create a Project and a Form](https://help.formspree.io/hc/en-us/articles/360053239754-Getting-started-with-projects) -- Add your **form endpoint** to `data/config.json` \ No newline at end of file +- Add your **form endpoint** to `data/config.json` diff --git a/layouts/partials/google-analytics.html b/layouts/partials/google-analytics.html new file mode 100644 index 0000000..0554e8d --- /dev/null +++ b/layouts/partials/google-analytics.html @@ -0,0 +1,9 @@ + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index ff0c6ec..8ab23d9 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,6 +3,18 @@ + {{ if .Site.Params.gaMeasurementID }} + + + + {{ end }} + {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ if .IsHome }}