From c340320a3247bd01759a9b30233ca6ad031e2303 Mon Sep 17 00:00:00 2001 From: iron3oxide Date: Thu, 23 Nov 2023 20:30:56 +0100 Subject: [PATCH] Fix umami analytics script name (#860) Apparently umami renamed their script which silently broke the feature in hugo-coder. closes #859 ### Prerequisites Put an `x` into the box(es) that apply: - [x] This pull request fixes a bug. - [ ] This pull request adds a feature. - [ ] This pull request introduces breaking change. ### Description It fixes the umami analytics feature. ### Issues Resolved #859 ### Checklist Put an `x` into the box(es) that apply: #### General - [x] Describe what changes are being made - [x] Explain why and how the changes were necessary and implemented respectively - [x] Reference issue with `#` if applicable #### Contributors - [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already --- CONTRIBUTORS.md | 4 +++- docs/analytics/umami.md | 4 +++- exampleSite/config.toml | 5 +++++ layouts/partials/analytics/umami.html | 3 +-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 48547fafb..88dbded6f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -134,4 +134,6 @@ - [Todor Bogosavljević](https://github.com/tbx1b) - [Kemal Akkoyun](https://github.com/kakkoyun) - [Igetin](https://github.com/Igetin) -- [Kirill Che.](https://github.com/g4s8) \ No newline at end of file +- [Kirill Che.](https://github.com/g4s8) +- [iron3oxide](https://github.com/iron3oxide) + \ No newline at end of file diff --git a/docs/analytics/umami.md b/docs/analytics/umami.md index 9cf38c2c7..0ed032364 100644 --- a/docs/analytics/umami.md +++ b/docs/analytics/umami.md @@ -3,5 +3,7 @@ ```toml [params.umami] siteID = "ABCDE" - serverURL = "analytics.example.com" + scriptURL = "analytics.REGION.umami.is/SCRIPTNAME.js" + # refer to the "tracking code" tab in your umami website dashboard + # to obtain the script url ``` diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 84c4a307f..88bef0b10 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -92,6 +92,11 @@ customRemoteJS = [] # [params.pirsch] # code = "ABCDE" +# If you want to use Umami(https://umami.is) for analytics, add this section +# [params.umami] +# siteID = "ABCDE" +# scriptURL = "analytics.REGION.umami.is/SCRIPTNAME.js" + # If you want to implement a Content-Security-Policy, add this section # [params.csp] # childsrc = ["'self'"] diff --git a/layouts/partials/analytics/umami.html b/layouts/partials/analytics/umami.html index 42a917fb8..3b2041c1d 100644 --- a/layouts/partials/analytics/umami.html +++ b/layouts/partials/analytics/umami.html @@ -1,4 +1,3 @@ - + \ No newline at end of file