mirror of
https://github.com/safing/web
synced 2025-04-16 17:09:09 +00:00
Add plausible
This commit is contained in:
parent
c0af3cf224
commit
5ab543e97e
2 changed files with 26 additions and 0 deletions
_includes
|
@ -32,3 +32,5 @@
|
|||
<link rel="stylesheet" href="{{ site.vendor_url }}css/fonts-roboto.css" type="text/css">
|
||||
<link rel="stylesheet" href="{{ site.vendor_url }}safingTailwind/safingTailwind-1.9.css" type="text/css">
|
||||
<link rel="stylesheet" href="{{ site.assets_url }}css/main.css" type="text/css">
|
||||
|
||||
{% include plausible.html %}
|
||||
|
|
24
_includes/plausible.html
Normal file
24
_includes/plausible.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!--
|
||||
We run a self-hosted installation of Plausible Analytics to collect some
|
||||
anonymous usage data for statistical purposes. The goal is to track overall
|
||||
trends in our website traffic, it is not to track individual visitors. All
|
||||
the data is in aggregate only. No personal data is collected.
|
||||
-->
|
||||
<script defer data-domain="safing.io" data-api="https://plausible.safing.io/event" src="https://plausible.safing.io/init.js"></script>
|
||||
<!--
|
||||
There are some occasions, where we need to add a simple "source" query parameter
|
||||
to URLs so that we can see where visitors are coming from, as referrers only
|
||||
work within browsers and with platforms that don't use special redirect mechanisms.
|
||||
|
||||
In order to maximize privacy in these cases, we remove the query parameter on page visit.
|
||||
To keep transparency, we don't just delete the query parameter, but move them into the URL
|
||||
hash "#disabled", to keep them visible, but disabled.
|
||||
|
||||
Here are some keywords, so that everyone who is curious will find this code snippet faster:
|
||||
plausible, analysis, analytics, campaign, tracking, query, hash, URL, #disabled?source=
|
||||
-->
|
||||
<script defer>
|
||||
if (document.location.search !== "") {
|
||||
window.history.replaceState({}, document.title, document.location.pathname + "#disabled" + document.location.search);
|
||||
}
|
||||
</script>
|
Loading…
Add table
Reference in a new issue