Skip to content

Commit 66bb886

Browse files
authored
Merge pull request #45 from Mazizova/add-plausible-analytics
Add Plausible Analytics
2 parents 8b7e493 + 95975fc commit 66bb886

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎hugo.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ params:
1414
slack: "https://join.slack.com/t/oursqlfoundation/shared_invite/zt-480k6h62a-t0HalCPwvXUC_lpd4aNylA"
1515
# Contact page's "For general inquiries" form posts here (Formspree).
1616
formspree_id: "mbgjpyed"
17+
# Plausible Analytics (privacy-friendly, no cookie banner needed).
18+
# domain must match what's registered in the Plausible dashboard;
19+
# script_url lets this point at a self-hosted instance instead of
20+
# Plausible Cloud if that's ever needed.
21+
plausible:
22+
domain: "oursqlfoundation.org"
23+
script_url: "https://plausible.io/js/script.js"
1724
# Reviews & Discussion widget on resource detail pages (Giscus, backed by
1825
# GitHub Discussions — no custom backend/auth to run ourselves, visitors
1926
# sign in with their own GitHub account). Discussions is enabled on the

‎layouts/partials/head.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@
7676
{{/* ── Favicon ── */}}
7777
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
7878

79+
{{/* ── Plausible Analytics (skipped in local/dev builds) ── */}}
80+
{{ with .Site.Params.plausible }}
81+
{{ if hugo.IsProduction }}
82+
<script defer data-domain="{{ .domain }}" src="{{ .script_url | default "https://plausible.io/js/script.js" }}"></script>
83+
{{ end }}
84+
{{ end }}
85+
7986
{{/* ── Resources JS ── */}}
8087
{{ if eq .Section "resources" }}
8188
<script src="/js/resources.js" defer></script>

0 commit comments

Comments
 (0)