Skip to content

Commit

Permalink
fix: umami script
Browse files Browse the repository at this point in the history
  • Loading branch information
not-matthias committed Dec 18, 2024
1 parent 580c6c6 commit 56ecf4d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,9 @@
{% if config.extra.analytics.enabled %}
{% if config.extra.analytics.umami.website_id %}
{% set website_id = config.extra.analytics.umami.website_id %}
{% set host_url = config.extra.analytics.umami.host_url | default(value="https://analytics.eu.umami.is") %}
{% set host_url = config.extra.analytics.umami.host_url | default(value="https://api-gateway.umami.dev/") %}

<script>
(function () {
var el = document.createElement('script');
el.setAttribute('src', '/js/imamu.js');
el.setAttribute('data-website-id', '{{ website_id }}');
el.setAttribute('data-host-url', '{{ host_url }}');
document.body.appendChild(el);
})();
</script>
<script async src="/js/imamu.js" data-website-id="{{ website_id }}" data-host-url="{{ host_url }}"></script>
<script defer src="/js/imamu.js" data-website-id="{{ website_id }}" data-host-url="{{ host_url }}"></script>
{% endif %}

{% if config.extra.analytics.goatcounter.user %}
Expand All @@ -116,7 +107,7 @@
{% if config.extra.toc | default(value=false) %}
<script src={{ get_url(path="js/toc.js") }}></script>
{% endif %}

{# Dynamic Note #}
{% if config.extra.dynamic_note | default(value=false) %}
<script src={{ get_url(path="js/note.js") }}></script>
Expand Down

0 comments on commit 56ecf4d

Please sign in to comment.