debug: add explicit dispatch of load event
This commit is contained in:
@@ -83,11 +83,7 @@ export default function Tracking({ pageData }: TrackingProps) {
|
||||
console.log("Cookiebot onAccept callback fired ✅")
|
||||
setConsentCookie(window._satellite.cookie.get("CookieConsent"))
|
||||
if (window.Cookiebot?.changed && window.adobe) {
|
||||
if (
|
||||
window._satellite.cookie
|
||||
.get("CookieConsent")
|
||||
.includes("statistics:true")
|
||||
) {
|
||||
if (consentCookie?.includes("statistics:true")) {
|
||||
window.adobe.optIn.approve(
|
||||
window.adobe.OptInCategories.ANALYTICS,
|
||||
true
|
||||
@@ -99,7 +95,8 @@ export default function Tracking({ pageData }: TrackingProps) {
|
||||
)
|
||||
}
|
||||
window.adobe.optIn.complete()
|
||||
console.log("optin complete")
|
||||
window.dispatchEvent(new Event("load"))
|
||||
console.log("dispatched load event")
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user