Skip to content

grantAllConsents

grantAllConsents is a DOM event that occurs whenever all consents are granted.

Event body

none

Example

In this example we listen to grantAllConsents event and perform an action whenever it's emitted.

useStorefront(async (storefront) => {
    document.addEventListener('grantAllConsents', () => {
        console.log('All consents have been granted');
    });
});