-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plausible analytics template and configuration
Co-authored-by: Laure Thompson <[email protected]>
- Loading branch information
Showing
3 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ | |
<script defer src="{{ $js.RelPermalink }}"></script> | ||
{{- 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 */}} | ||
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/build/openseadragon/openseadragon.min.js" integrity="sha256-NMxPj6Qf1CWCzNQfKoFU8Jx18ToY4OWgnUO1cJWTWuw=" crossorigin="anonymous"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- if isset site.Params "plausible" }} | ||
{{/* plausible analytics */}} | ||
<script defer data-domain="{{ site.Params.plausible.domain }}" src="{{ site.Params.plausible.script }} "></script> | ||
{{- if isset site.Params.plausible "notfound" }} | ||
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script> | ||
{{- end }} | ||
{{- end }} |