From 994c463e56a49ebff95093c791908de9ea9e1e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Sat, 3 May 2025 21:23:07 -0300 Subject: [PATCH] add analytics --- superpage/src/CookieConsentConfig.ts | 1 - superpage/src/components/CookieConsent.astro | 2 ++ superpage/src/layouts/Layout.astro | 7 ++----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/superpage/src/CookieConsentConfig.ts b/superpage/src/CookieConsentConfig.ts index 7ad5d77..e9a4987 100644 --- a/superpage/src/CookieConsentConfig.ts +++ b/superpage/src/CookieConsentConfig.ts @@ -35,7 +35,6 @@ export const config: CookieConsentConfig = { 'Google Analytics 4', onAccept: () => { console.log("ga4 accepted"); - window.gtag("consent", "update", { ad_storage: "granted", ad_user_data: "granted", diff --git a/superpage/src/components/CookieConsent.astro b/superpage/src/components/CookieConsent.astro index d561d26..bff22a6 100644 --- a/superpage/src/components/CookieConsent.astro +++ b/superpage/src/components/CookieConsent.astro @@ -14,5 +14,7 @@ import "vanilla-cookieconsent/dist/cookieconsent.css"; import { run } from "vanilla-cookieconsent"; import { config } from "~/CookieConsentConfig"; + document.documentElement.classList.add("cc--darkmode"); + run(config); diff --git a/superpage/src/layouts/Layout.astro b/superpage/src/layouts/Layout.astro index ef07109..ccec551 100644 --- a/superpage/src/layouts/Layout.astro +++ b/superpage/src/layouts/Layout.astro @@ -5,7 +5,7 @@ import Footer from "./_components/Footer.astro"; --- - + @@ -20,11 +20,10 @@ import Footer from "./_components/Footer.astro"; - - -