Skip to content

Commit

Permalink
Enhance 404 error handling in Plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Oct 30, 2024
1 parent d5bf065 commit 82285ba
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions assets/js/plausible404eventlistener.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });
1 change: 0 additions & 1 deletion assets/js/plausible404init.js

This file was deleted.

7 changes: 0 additions & 7 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,5 @@
<script type="text/javascript" src="{{ $lazysizes.RelPermalink }}" integrity="{{ $lazysizes.Data.Integrity }}" async></script>

<script defer data-domain="cryptomator.org" src="https://plausible.skymatic.de/js/script.file-downloads.outbound-links.js"></script>
{{ if hugo.IsServer }}
{{ $plausible404init := resources.Get "js/plausible404init.js" }}
<script type="text/javascript" src="{{ $plausible404init.RelPermalink }}"></script>
{{ else }}
{{ $plausible404init := resources.Get "js/plausible404init.js" | minify | fingerprint }}
<script type="text/javascript" src="{{ $plausible404init.RelPermalink }}" integrity="{{ $plausible404init.Data.Integrity }}"></script>
{{ end }}
</body>
</html>

0 comments on commit 82285ba

Please sign in to comment.