From 31d4e540ceb25185d7692f2625069378b73531a5 Mon Sep 17 00:00:00 2001
From: Linus Olofsson
Date: Sun, 25 Oct 2026 18:11:36 +0100
Subject: [PATCH] feat(tracking): Meta Pixel behind cookie consent
- Meta Pixel (2453598878495749) loads only after the visitor clicks Accept;
choice stored in localStorage (ibo-consent).
- Decline after a previous Accept clears _fbp/_fbc and reloads.
- "Cookie settings" link in the footer reopens the banner.
- Privacy page: removed "no tracking cookies", added Meta Pixel section.
Co-Authored-By: Claude Opus 5.5
---
src/layouts/MainLayout.astro | 67 +++++++++++++++++++++++++++++++++++-
src/pages/privacy.astro | 19 ++++++++--
2 files changed, 83 insertions(+), 3 deletions(-)
diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro
index 11b08fd..d026ac6 100644
--- a/src/layouts/MainLayout.astro
+++ b/src/layouts/MainLayout.astro
@@ -39,8 +39,73 @@ const { title } = Astro.props;
&
karleksguiden.se
-
+
+ I use the Meta Pixel to see how visitors from Instagram and Facebook use this site. It sets cookies and sends data to Meta.
+ Read more
+
+
+
+
+
+
+
+
+