-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi ,
I'm experiencing an issue where onConsentChanged does not trigger properly when changing consents. However, when using an event listener, I can capture consent changes immediately.
This doesn't work :/
<DidomiSDK
apiKey={config.thirdparty.didomi.apiKey}
iabVersion={2}
config={{
user: {
bots: {
consentRequired: false,
},
},
sync: {
enabled: true,
delayNotice: true,
},
}}
noticeId={config.thirdparty.didomi.noticeId}
gdprAppliesGlobally={true}
embedTCFStub={true}
onConsentChanged={cwtToken => {
return console.log('A consent has been given/withdrawn', cwtToken);
}}
/>
This works, i get the console.log message
<DidomiSDK
apiKey={config.thirdparty.didomi.apiKey}
iabVersion={2}
config={{
user: {
bots: {
consentRequired: false,
},
},
sync: {
enabled: true,
delayNotice: true,
},
}}
noticeId={config.thirdparty.didomi.noticeId}
gdprAppliesGlobally={true}
embedTCFStub={true}
onReady={didomiSdk => {
didomiSdk.on('consent.changed', () => {
console.log('consent changed inside event listener');
});
/>
Metadata
Metadata
Assignees
Labels
No labels