diff --git a/config.yaml b/config.yaml index 3ceec3ce..2237d61d 100644 --- a/config.yaml +++ b/config.yaml @@ -9,5 +9,4 @@ params: navColor: blue search: false plausible: - dataDomain: null - javaScript: "https://views.scientific-python.org/js/script.js" + script: null diff --git a/doc/content/user_guide/features.md b/doc/content/user_guide/features.md index 18f0aea1..ae663c3d 100644 --- a/doc/content/user_guide/features.md +++ b/doc/content/user_guide/features.md @@ -74,13 +74,15 @@ To enable Plausible analytics, add to your `config.yaml`: ```yaml params: plausible: - dataDomain: your-domain.org - javaScript: https://your.plausible.io/javascript/path.js + script: https://your.plausible.io/js/pa-XXXXXXXX.js ``` -By default, `javaScript` points to the server at -`https://views.scientific-python.org`. Contact the Scientific -Python team to have your analytics hosted there. +The script URL is specific to your site; find it in the Plausible dashboard +under **Site settings → Site installation**. Contact the Scientific Python +team to have your analytics hosted at `https://views.scientific-python.org`. + +The older `dataDomain` / `javaScript` options still work but are deprecated +and will be removed in a future release. ## Icons diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index f93f6fa9..51af0508 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1,3 +1,12 @@ -{{ if .Site.Params.plausible.dataDomain }} - +{{ with .Site.Params.plausible }} +{{ if .script }} + + +{{ else if .dataDomain }} +{{ warnf "plausible.dataDomain is deprecated; set plausible.script to your site's script URL instead (see https://plausible.io/docs/script-update-guide)" }} + +{{ end }} {{ end }}