Skip to main content

Callbacks

Callback nameDescription
MonsidoCookieOnLoadTriggered when the cookie banner is initialized.
MonsidoCookieOnShowTriggered when the cookie banner is displayed.
MonsidoCookieOnHideTriggered when the cookie banner is hidden.
MonsidoCookieOnAcceptTriggered first time the visitor makes a consent choice after page load.
MonsidoCookieOnUpdateTriggered when the visitor changes their consent decision.
MonsidoCookieOnAcceptTriggered when the visitor accepts the use of cookies the first time after page load.
MonsidoCookieOnUpdateTriggered when the visitor changes the use of cookies.
MonsidoCookieRunEssentialScriptsTriggered when the visitor gives consent to essential cookies.
MonsidoCookieRunBasicScriptsTriggered when the visitor gives consent to basic cookies.
MonsidoCookieRunMarketingScriptsTriggered when the visitor gives consent to marketing cookies.
MonsidoCookieRunAnalyticsScriptsTriggered when the visitor gives consent to statistics cookies.
MonsidoCookieRunPersonalisationScriptsTriggered when the visitor gives consent to preference cookies.

Usage

window.MonsidoCookieOnLoad = function() {
console.log('Cookie Banner Loaded');
};
window.MonsidoCookieOnShow = function() {
console.log('Cookie Banner Shown');
};
window.MonsidoCookieOnHide = function() {
console.log('Cookie Banner Hidden');
};
window.MonsidoCookieOnAccept = function() {
console.log('Cookie Consent Accepted');
console.log('Consent', window.monsidoConsentManager.cookiesConsent);
};
window.MonsidoCookieOnUpdatet = function() {
console.log('Cookie Consent Changed');
console.log('Consent', window.monsidoConsentManager.cookiesConsent);
};
window.MonsidoCookieRunEssentialScripts = function() {
// Execute scripts that requires essential consent here
};
window.MonsidoCookieRunBasicScripts = function() => {
// Execute scripts that requires basic consent here
};
window.MonsidoCookieRunMarketingScripts = function() => {
// Execute scripts that requires marketing consent here
};
window.MonsidoCookieRunAnalyticsScripts = function() => {
// Execute scripts that requires statistics consent here
};
window.MonsidoCookieRunPersonalisationScripts = function() => {
// Execute scripts that requires preferences consent here
};