fix: tweak CookiebotOnAccept effect hook
This commit is contained in:
@@ -79,10 +79,11 @@ export default function Tracking({ pageData }: TrackingProps) {
|
|||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"CookiebotOnAccept",
|
"CookiebotOnAccept",
|
||||||
function CookiebotCallback_OnAccept(e) {
|
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 (window.Cookiebot?.changed && window.adobe) {
|
||||||
if (consentCookie?.includes("statistics:true")) {
|
if (cookie?.includes("statistics:true")) {
|
||||||
window.adobe.optIn.approve(
|
window.adobe.optIn.approve(
|
||||||
window.adobe.OptInCategories.ANALYTICS,
|
window.adobe.OptInCategories.ANALYTICS,
|
||||||
true
|
true
|
||||||
|
|||||||
Reference in New Issue
Block a user