Skip to content

Commit

Permalink
Fix umami analytics script name (#860)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
iron3oxide authored Nov 23, 2023
1 parent c466504 commit c340320
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 3 additions & 1 deletion docs/analytics/umami.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
5 changes: 5 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'"]
Expand Down
3 changes: 1 addition & 2 deletions layouts/partials/analytics/umami.html
Original file line number Diff line number Diff line change
@@ -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 -->

0 comments on commit c340320

Please sign in to comment.