diff --git a/components/Current/Tracking.tsx b/components/Current/Tracking.tsx index 446663fb5..443e81490 100644 --- a/components/Current/Tracking.tsx +++ b/components/Current/Tracking.tsx @@ -79,10 +79,11 @@ export default function Tracking({ pageData }: TrackingProps) { window.addEventListener( "CookiebotOnAccept", function CookiebotCallback_OnAccept(e) { - setConsentCookie(window._satellite.cookie.get("CookieConsent")) + const cookie = window._satellite.cookie.get("CookieConsent") + setConsentCookie(cookie) if (window.Cookiebot?.changed && window.adobe) { - if (consentCookie?.includes("statistics:true")) { + if (cookie?.includes("statistics:true")) { window.adobe.optIn.approve( window.adobe.OptInCategories.ANALYTICS, true