From a8dd2fc1b26a74ead01e8ae4a832d4b8f488b9b7 Mon Sep 17 00:00:00 2001 From: Lorenzo Iovino Date: Fri, 2 Oct 2026 02:02:27 +0200 Subject: [PATCH 1/2] feat: via Google Analytics e il banner cookie, le visite si contano con Umami self-hosted senza cookie --- src/components/CookieBanner.astro | 81 ------------------------------- src/components/Footer.astro | 8 --- src/layouts/BaseLayout.astro | 51 +++---------------- src/pages/cookie-policy.md | 24 +++------ src/pages/privacy-policy.md | 14 +++--- 5 files changed, 22 insertions(+), 156 deletions(-) delete mode 100644 src/components/CookieBanner.astro diff --git a/src/components/CookieBanner.astro b/src/components/CookieBanner.astro deleted file mode 100644 index 414c096..0000000 --- a/src/components/CookieBanner.astro +++ /dev/null @@ -1,81 +0,0 @@ ---- -// Own cookie banner (no iubenda). Not a cookie wall: a floating card, the site -// stays usable behind it. Reject and Accept have the same weight. The only -// thing that needs consent is Google Analytics, loaded by window.loadAnalytics -// (BaseLayout) only after "Accept". ---- - - - - diff --git a/src/components/Footer.astro b/src/components/Footer.astro index c9d5c26..ed0808e 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -38,14 +38,6 @@ const maxWidth = width === "7xl" ? "max-w-7xl" : "max-w-4xl"; Cookie Policy - • -
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 06675a9..9534423 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -32,42 +32,20 @@ const fullImageUrl = image : `${siteUrl}${image}` : `${siteUrl}${defaultImage}`; const fullCanonicalUrl = canonicalUrl || `${siteUrl}${Astro.url.pathname}`; -import CookieBanner from "../components/CookieBanner.astro"; --- - + @@ -207,8 +185,6 @@ import CookieBanner from "../components/CookieBanner.astro"; - -
{ - const banner = document.getElementById("cookie-banner"); - return !!banner && !banner.classList.contains("hidden"); - }; const showToast = () => { - if (bannerOpen()) { - window.addEventListener("cookie-consent", () => setTimeout(showToast, 1500), { - once: true, - }); - return; - } const isDarkMode = document.documentElement.classList.contains("dark"); if (!isDarkMode && !hasBeenDismissed && toast) { toast.classList.remove("hidden"); diff --git a/src/pages/cookie-policy.md b/src/pages/cookie-policy.md index 1d805b6..bbf983a 100644 --- a/src/pages/cookie-policy.md +++ b/src/pages/cookie-policy.md @@ -1,13 +1,13 @@ --- layout: ../layouts/LegalLayout.astro title: "Cookie Policy" -description: "Which cookies and local storage lorenzoiovino.com uses and how to change your choice." -updated: "September 29, 2026" +description: "Which cookies and local storage lorenzoiovino.com uses." +updated: "October 2, 2026" --- -The site works without cookies. Analytics cookies are set only if you accept them. +The site sets no cookies. That's why there is no cookie banner. -## Technical storage (always on) +## Technical storage The site saves a few small values in your browser's local storage. They don't track you and are never sent to anyone. They only remember your choices: @@ -15,28 +15,20 @@ The site saves a few small values in your browser's local storage. They don't tr |---|---|---| | `theme` | light or dark mode | until you clear it | | `darkModeToastDismissed` | don't show the "Try Dark Mode?" hint again | until you clear it | -| `cookieConsent`, `cookieConsentDate` | your answer to the cookie banner | 6 months, then the banner asks again | These are strictly necessary for the features you use, so they don't need consent. -## Analytics cookies (only if you accept) +## Visit statistics -If you click **Accept**, Google Analytics 4 sets these cookies to count visits: - -| Name | Provider | Duration | -|---|---|---| -| `_ga` | Google | 2 years | -| `_ga_` | Google | 2 years | - -More details on how Google uses this data are in the [Privacy Policy](/privacy-policy) and in [Google's documentation](https://policies.google.com/technologies/cookies). +Visits are counted with **Umami**, self-hosted on my own server at OVH in France. It uses no cookies, doesn't store your IP address and shares nothing with third parties. More details are in the [Privacy Policy](/privacy-policy). ## Third-party content Some blog posts embed videos from YouTube and GIFs from Giphy. These services may set their own cookies when you open those posts. They are ruled by the cookie policies of [Google](https://policies.google.com/technologies/cookies) and [Giphy](https://support.giphy.com/hc/en-us/articles/360032872931-GIPHY-Privacy-Policy). -## Change your choice +## Your choice -Use **Cookie settings** in the footer to open the banner again. If you switch from Accept to Reject, the Google Analytics cookies are deleted. You can also delete cookies and local storage from your browser settings at any time. +You can delete cookies and local storage from your browser settings at any time. ## Contact diff --git a/src/pages/privacy-policy.md b/src/pages/privacy-policy.md index 5888d70..634bcc9 100644 --- a/src/pages/privacy-policy.md +++ b/src/pages/privacy-policy.md @@ -2,7 +2,7 @@ layout: ../layouts/LegalLayout.astro title: "Privacy Policy" description: "What personal data lorenzoiovino.com processes, why and what your rights are." -updated: "September 29, 2026" +updated: "October 2, 2026" --- This is a personal website with a blog. It has no accounts, no forms and no newsletter, so it collects very little. This page explains what. @@ -21,15 +21,13 @@ The site is hosted on a server of **OVH Srl** in Milan, Italy. Like any web serv Legal basis: legitimate interest in running a secure website (art. 6.1.f GDPR). -### Google Analytics (only if you accept) +### Visit statistics -If you click **Accept** on the cookie banner, the site loads **Google Analytics 4** (Google Ireland Limited / Google LLC) to count visits and see which pages people read. It uses cookies and collects usage data: pages visited, time on page, device, browser, approximate location. Google Analytics 4 does not store the full IP address. +To count visits and see which pages people read, the site uses **Umami**, self-hosted on my own server at **OVH** in France. It sets no cookies and doesn't store your IP address. The data stays on my server and is not shared with third parties. If your browser sends a Do Not Track signal, the visit is not counted. -Data may be transferred to the United States. Google LLC is certified under the EU-US Data Privacy Framework. +Since there are no cookies and no tracking, there is no cookie banner. -If you click **Reject**, Google Analytics is never loaded. You can change your choice at any time with **Cookie settings** in the footer. - -Legal basis: your consent (art. 6.1.a GDPR). +Legal basis: legitimate interest in knowing which pages are read (art. 6.1.f GDPR). ### Google Fonts @@ -47,7 +45,7 @@ If you write to me, I use your email address and what you write only to answer y ## Your rights -You can ask me to access, correct or delete your data, to restrict or object to its processing and to receive it in a portable format. You can withdraw your consent to analytics at any time, without affecting what happened before. +You can ask me to access, correct or delete your data, to restrict or object to its processing and to receive it in a portable format. Write to [thisloke@proton.me](mailto:thisloke@proton.me). If you think your data is processed unlawfully, you can also file a complaint with the Italian data protection authority, the [Garante per la protezione dei dati personali](https://www.garanteprivacy.it). From 6a0ee958fb0b7dfd02bf4e5bba2442d627cd07c4 Mon Sep 17 00:00:00 2001 From: Lorenzo Iovino Date: Fri, 2 Oct 2026 02:04:20 +0200 Subject: [PATCH 2/2] docs: la privacy policy dice dove sta davvero il server, OVH a Gravelines in Francia --- src/pages/privacy-policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/privacy-policy.md b/src/pages/privacy-policy.md index 634bcc9..dd6190d 100644 --- a/src/pages/privacy-policy.md +++ b/src/pages/privacy-policy.md @@ -17,7 +17,7 @@ Contact: [thisloke@proton.me](mailto:thisloke@proton.me) ### Server logs -The site is hosted on a server of **OVH Srl** in Milan, Italy. Like any web server, it records technical data for every request: IP address, date and time, requested page, browser and operating system. These logs are used only to keep the site running and secure (errors, abuse, attacks) and are kept for a limited time. +The site is hosted on a server of **OVH SAS** in Gravelines, France. Like any web server, it records technical data for every request: IP address, date and time, requested page, browser and operating system. These logs are used only to keep the site running and secure (errors, abuse, attacks) and are kept for a limited time. Legal basis: legitimate interest in running a secure website (art. 6.1.f GDPR).