From 90693ff95e72ca4b5135a7b454a6ab521b995b3e Mon Sep 17 00:00:00 2001 From: Benjamin van den Hout Date: Tue, 6 Feb 2024 15:19:28 +0100 Subject: [PATCH] feat: add analytics support for GoatCounter (#1526) --- README.md | 2 +- _config.yml | 3 +++ _includes/goatcounter.html | 8 ++++++++ _includes/js-selector.html | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 _includes/goatcounter.html diff --git a/README.md b/README.md index 16d6ab1..0e074cf 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ - Built-in Search - Atom Feeds - PWA -- Google Analytics +- Google Analytics / GoatCounter - SEO & Performance Optimization ## Documentation diff --git a/_config.yml b/_config.yml index 341e45d..79d451f 100644 --- a/_config.yml +++ b/_config.yml @@ -52,6 +52,9 @@ google_site_verification: # fill in to your verification string google_analytics: id: # fill in your Google Analytics ID +goatcounter: + id: # fill in your Goatcounter ID + # Prefer color scheme setting. # # Note: Keep empty will follow the system prefer color by default, diff --git a/_includes/goatcounter.html b/_includes/goatcounter.html new file mode 100644 index 0000000..4d21d21 --- /dev/null +++ b/_includes/goatcounter.html @@ -0,0 +1,8 @@ + + + + diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 0e7f6f4..1a1fa58 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -105,4 +105,9 @@ {% if site.google_analytics.id != empty and site.google_analytics.id %} {% include google-analytics.html %} {% endif %} + + + {% if site.goatcounter.id != empty and site.goatcounter.id %} + {% include goatcounter.html %} + {% endif %} {% endif %}