diff --git a/README.md b/README.md index 0b5c9e1..fe56d40 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,13 @@ Environment; see *Contact form* below. after the alpha mail is sent or on withdrawal. The result pages `/notify/confirmed` and `/notify/error` are `noindex` and left out of the sitemap. Set the flag to false to bring back the full product page. -- **Matomo.** The privacy page links to the existing opt-out on `cipher.uber.space`. The tracking - snippet itself is not included; add it in `src/layouts/Base.astro` if analytics should continue. +- **Matomo.** Production builds load the tracker from the self-hosted Matomo at + `matomo.ciphercell.de` (`src/components/Matomo.astro`, included in `src/layouts/Base.astro`); + URL and site ID are in `src/data/analytics.ts`. It runs without cookies and honours Do Not + Track, as the privacy page states; `astro dev` never loads it. The opt-out on the privacy page + (`src/components/OptOut.astro`) asks the same tracker: opting out stores the one cookie + `mtm_consent_removed`, opting back in deletes it. With Do Not Track, or when a blocker keeps + `matomo.js` from loading, it says that nothing is counted instead of showing the button. ## Insights filter diff --git a/src/components/Matomo.astro b/src/components/Matomo.astro new file mode 100644 index 0000000..9075042 --- /dev/null +++ b/src/components/Matomo.astro @@ -0,0 +1,23 @@ +--- +/** + * The Matomo tracker: a page view per page, outgoing links and downloads, no cookies, Do Not + * Track honoured. matomo.js loads async from our own Matomo, so it never holds up the page. + */ +import { matomo } from '../data/analytics'; +const { url, siteId, enabled } = matomo; +--- +{enabled && ( + +)} diff --git a/src/components/OptOut.astro b/src/components/OptOut.astro new file mode 100644 index 0000000..6a39780 --- /dev/null +++ b/src/components/OptOut.astro @@ -0,0 +1,63 @@ +--- +/** + * The Matomo opt-out on the privacy page, in the site's own type rather than Matomo's embed. It + * asks the tracker already on the page: optUserOut stores the one cookie the tracker keeps with + * cookies disabled (mtm_consent_removed), forgetUserOptOut removes it. If the tracker never + * arrives (a content blocker, or a development build), the page says so: nothing is counted. + */ +import { t, type Lang } from '../i18n/ui'; +interface Props { lang: Lang } +const { lang } = Astro.props; +const o = t(lang).legal.optOut; +--- +
+

{o.checking}

+ + +
+ + + + diff --git a/src/data/analytics.ts b/src/data/analytics.ts new file mode 100644 index 0000000..f160fc7 --- /dev/null +++ b/src/data/analytics.ts @@ -0,0 +1,9 @@ +/* Matomo, self-hosted. The tracker runs without cookies and honours Do Not Track; the privacy + page states both, and its opt-out (src/components/OptOut.astro) talks to the same tracker. + Only production builds load it, so local development is never counted. */ +export const matomo = { + url: 'https://matomo.ciphercell.de/', + /* The site's ID in Matomo: Administration, Websites, Manage. */ + siteId: '1', + enabled: import.meta.env.PROD, +}; diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 704ac98..a57fc91 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -376,6 +376,16 @@ const en = { mailing: 'Mailing address', contact: 'Contact', asOf: 'As of 14 June 2025', + optOut: { + checking: 'Checking whether your visits are counted.', + in: 'Your visits are counted, anonymously and without cookies.', + out: 'Your visits are not counted. To remember that, this browser keeps one cookie, mtm_consent_removed.', + dnt: 'Your browser sends Do Not Track. Your visits are not counted.', + missing: 'The statistics script is not loaded in this browser, for example because of a content blocker. Your visits are not counted.', + noscript: 'Without JavaScript the statistics script does not run. Your visits are not counted.', + stop: 'Stop counting my visits', + resume: 'Count my visits again', + }, }, }; @@ -727,6 +737,16 @@ const de: typeof en = { mailing: 'Postanschrift', contact: 'Kontakt', asOf: 'Stand: 14. Juni 2025', + optOut: { + checking: 'Es wird geprüft, ob Ihre Besuche gezählt werden.', + in: 'Ihre Besuche werden gezählt, anonymisiert und ohne Cookies.', + out: 'Ihre Besuche werden nicht gezählt. Damit das so bleibt, speichert dieser Browser ein Cookie: mtm_consent_removed.', + dnt: 'Ihr Browser sendet „Do Not Track“. Ihre Besuche werden nicht gezählt.', + missing: 'Das Statistik-Skript ist in diesem Browser nicht geladen, etwa wegen eines Inhaltsblockers. Ihre Besuche werden nicht gezählt.', + noscript: 'Ohne JavaScript läuft das Statistik-Skript nicht. Ihre Besuche werden nicht gezählt.', + stop: 'Besuche nicht mehr zählen', + resume: 'Besuche wieder zählen', + }, }, }; diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 44dd173..93859bc 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -2,6 +2,7 @@ import '../styles/base.css'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; +import Matomo from '../components/Matomo.astro'; import { langFromUrl, switchLang, t, type Lang } from '../i18n/ui'; interface Props { @@ -51,6 +52,7 @@ const altDe = new URL(switchLang(Astro.url, 'de'), Astro.site); + diff --git a/src/pages/de/privacy.astro b/src/pages/de/privacy.astro index e345764..58c509f 100644 --- a/src/pages/de/privacy.astro +++ b/src/pages/de/privacy.astro @@ -1,5 +1,6 @@ --- import Legal from '../_Legal.astro'; +import OptOut from '../../components/OptOut.astro'; import { t } from '../../i18n/ui'; const ui = t('de'); --- @@ -9,7 +10,8 @@ const ui = t('de');

Webanalyse mit Matomo (ohne Cookies)

Wir verwenden auf unserer Website die Open-Source-Webanalysesoftware Matomo, um das Nutzungsverhalten auf datenschutzfreundliche Weise auszuwerten und unsere Website technisch und inhaltlich zu verbessern. Dabei haben wir Matomo so konfiguriert, dass keine Cookies gesetzt werden und Ihre IP-Adresse anonymisiert gespeichert wird. Es werden keine personenbezogenen Daten verarbeitet, und es erfolgt keine Weitergabe an Dritte. Die Verarbeitung erfolgt auf Grundlage unseres berechtigten Interesses gemäß Art. 6 Abs. 1 lit. f DSGVO an der statistischen Analyse des Nutzerverhaltens zur Optimierung unseres Webangebots. Wenn Ihr Browser die „Do Not Track“-Funktion unterstützt und aktiviert ist, wird Ihr Besuch von Matomo automatisch ignoriert. Sie können der anonymisierten Analyse Ihres Besuchs dennoch jederzeit widersprechen. Nutzen Sie dazu bitte den folgenden Opt-out.

-

Matomo Opt-out

+

Der Opt-out speichert ein Cookie, mtm_consent_removed, damit Matomo Ihre Besuche weiterhin ignoriert; es enthält keine Kennung, und sonst wird nichts gespeichert.

+

Datensicherheit

Ihre Nutzerdaten sind bei der Übermittlung auf unsere Server durch den Einsatz von TLS in Verbindung mit einer 256-Bit-Verschlüsselung geschützt. Sie können die Sicherheit der Verbindung anhand der Angaben in der Adresszeile Ihres Browsers prüfen. Beginnt die Adresszeile mit „https“, liegt eine gesicherte Verbindung vor.

diff --git a/src/pages/privacy.astro b/src/pages/privacy.astro index c13a1f9..d7fb13e 100644 --- a/src/pages/privacy.astro +++ b/src/pages/privacy.astro @@ -1,5 +1,6 @@ --- import Legal from './_Legal.astro'; +import OptOut from '../components/OptOut.astro'; import { t } from '../i18n/ui'; const ui = t('en'); --- @@ -9,7 +10,8 @@ const ui = t('en');

Web analytics with Matomo (without cookies)

We use the open source web analytics software Matomo on our website to evaluate user behavior in a privacy-friendly manner and to improve our website in terms of technology and content. We have configured Matomo so that no cookies are set and your IP address is stored anonymously. No personal data is processed and no data is passed on to third parties. Processing is based on our legitimate interest pursuant to Art. 6 (1) lit. f GDPR in the statistical analysis of user behavior for the purpose of optimizing our website. If your browser supports and has activated the "Do Not Track" function, your visit will be automatically ignored by Matomo. You can still object to the anonymized analysis of your visit at any time. To do so, please use the opt-out below.

-

Matomo opt-out

+

The opt-out stores one cookie, mtm_consent_removed, so that Matomo keeps ignoring your visits; it contains no identifier and nothing else is stored.

+

Data security

Your user data is protected during transmission to our servers through the use of TLS in conjunction with 256-bit encryption. You can check the security of the connection by looking at the information in your browser's address bar. If the beginning of the address line reads "https", the connection is secure.