diff --git a/config/_default/config.yaml b/config/_default/config.yaml index 5942a59ca..eb1b9fe3f 100644 --- a/config/_default/config.yaml +++ b/config/_default/config.yaml @@ -60,6 +60,11 @@ params: ISSN: 2694-2658 googleSiteVerification: pS2kpksxg6JeC90IvA8BHVsFuK_6b7J_vARVLqqu7ck absoluteArticleLinks: false + plausible: + domain: startwords.cdh.princeton.edu + script: https://plausible.io/js/script.file-downloads.hash.outbound-links.js + notfound: true + defaultContentLang: en diff --git a/themes/startwords/layouts/_default/baseof.html b/themes/startwords/layouts/_default/baseof.html index 44482421d..3d3e83726 100644 --- a/themes/startwords/layouts/_default/baseof.html +++ b/themes/startwords/layouts/_default/baseof.html @@ -73,6 +73,7 @@ {{- if hugo.IsProduction -}} {{ partial "partials/google_analytics.html" . }} + {{ partial "partials/plausible_analytics.html" . }} {{- end -}} {{- if or (.HasShortcode "deepzoom") (isset .Page.Params "needs_deepzoom") }}{{/* include openseadragon when deepzoom shortcode is used or requested in page params */}} diff --git a/themes/startwords/layouts/partials/plausible_analytics.html b/themes/startwords/layouts/partials/plausible_analytics.html new file mode 100644 index 000000000..32e60dc0c --- /dev/null +++ b/themes/startwords/layouts/partials/plausible_analytics.html @@ -0,0 +1,7 @@ +{{- if isset site.Params "plausible" }} +{{/* plausible analytics */}} + +{{- if isset site.Params.plausible "notfound" }} + +{{- end }} +{{- end }} \ No newline at end of file