mirror of https://github.com/luizdepra/hugo-coder.git

iron3oxide
23.30.2023 c340320a3247bd01759a9b30233ca6ad031e2303
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 `#<ISSUE_NO>` if applicable

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
4 files modified
16 ■■■■ changed files
CONTRIBUTORS.md 4 ●●● patch | view | raw | blame | history
docs/analytics/umami.md 4 ●●● patch | view | raw | blame | history
exampleSite/config.toml 5 ●●●●● patch | view | raw | blame | history
layouts/partials/analytics/umami.html 3 ●●●● patch | view | raw | blame | history
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)
- [Kirill Che.](https://github.com/g4s8)
- [iron3oxide](https://github.com/iron3oxide)
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
```
exampleSite/config.toml
@@ -92,6 +92,11 @@
# [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'"]
layouts/partials/analytics/umami.html
@@ -1,4 +1,3 @@
<!-- Umami Analytics START -->
<script async defer data-website-id="{{ .Site.Params.umami.siteID }}"
    src="{{ .Site.Params.umami.serverURL }}/umami.js"></script>
<script async defer data-website-id="{{ .Site.Params.umami.siteID }}" src="{{ .Site.Params.umami.scriptURL }}"></script>
<!-- Umami Analytics END -->