Skip to main content
All CollectionsDigging deeper
Javascript events overview
Javascript events overview

Use our JS events as triggers for custom logic

Thierry Maasdam avatar
Written by Thierry Maasdam
Updated this week

Consent Studio javascript browser events

Window events

These events are dispatched within the window context in javascript.

These javascript events can help you trigger custom javascript logic. But did you know that we already have prepared a set of useful integrations for you? Discover our integrations here Β»

Consent updates

Functional consent granted:

consent-studio__updated__granted__functional

Analytics consent granted:

consent-studio__updated__granted__analytics

Marketing consent granted:

consent-studio__updated__granted__marketing

Functional consent denied:

consent-studio__updated__denied__functional

Analytics consent denied:

consent-studio__updated__denied__analytics

Marketing consent denied:

consent-studio__updated__denied__marketing

Example use

window.addEventListener('consent-studio__updated__granted__analytics', function() {
alert('Consent Studio parsed or received consent for the analytics category');
});

Did this answer your question?