feat(Plausible): Add script

This commit is contained in:
Simon 2022-02-22 19:09:42 +01:00
parent 755cfc0c86
commit b55c159daa
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@
<li><a href="/politique/">Politique de protection des données</a></li>
</ul>
</footer>
{{ if eq hugo.Environment "production" }}
<script defer data-domain="resilien.fr" src="https://analytiques.resilien.cloud/js/plausible.js"></script>
{{ if or (eq hugo.Environment "production") (eq hugo.Environment "staging") }}
<script defer data-api="/api/event" data-domain="{{if eq hugo.Environment "staging" }}staging.{{ end }}resilien.fr" src="/js/script.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
{{ end }}

View File

@ -8,7 +8,7 @@
{{ printf "</%s>" $tag | safeHTML }}
<nav class="menu cell -right">
<ul>
<li><a href="/#comment-bénéficier-des-services-de-résilien-">Contact</a></li>
<li><a onclick="plausible('Contact')" href="/#comment-bénéficier-des-services-de-résilien-">Contact</a></li>
<li><a href="/#quels-services-propose-résilien">Services</a></li>
<li><a href="/blog/">Blog</a></li>
</ul>