---
title: "Events"
date: "2024-07-24T17:56:27+00:00"
summary: "Discover key events in Web Governance Consent Manager. Learn how to implement and respond to user cookie preferences effectively."
image:
type: "page"
url: "/web-governance/events"
id: "cf448150-168f-4481-ada4-aca1a18e7995"
---

The events in the following table can be triggered in Web Governance Consent Manager.
=====================================================================================

Name

Description

MonsidoCookieOnLoad

The event is triggered when the cookie banner is initialized.

MonsidoCookieOnShow

The event is triggered when the cookie banner is displayed on the website (regardless of whether consent has already been submitted or not).

MonsidoCookieOnHide

The event is triggered when the cookie banner is hidden (either consent has already been submitted or cookie banner is forced to be hidden).

MonsidoCookieOnAccept

The event is triggered when the visitor accepts the use of cookies the first time after page load.

MonsidoCookieOnUpdate

The event is triggered when the visitor changes the use of cookies.

MonsidoCookieRunEssentialScripts

The event is triggered when the visitor gives consent to essential cookies.

MonsidoCookieRunBasicScripts

The event is triggered when the visitor gives consent to basic cookies.

MonsidoCookieRunMarketingScripts

The event is triggered when the visitor gives consent to marketing cookies.

MonsidoCookieRunAnalyticsScripts

The event is triggered when the visitor gives consent to statistics cookies.

MonsidoCookieRunPersonalisationScripts

The event is triggered when the visitor gives consent to preferences cookies.

Usage[​](https://developer.monsido.com/consent-manager/events#usage "Direct link to Usage")
-------------------------------------------------------------------------------------------

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