Skip to main content

Methods

Cookie banner methods can be invoked via the window.monsidoConsentManager object.

NameArgumentsDescription
initNoneWhen manualStartup setting is enabled, use this method to manually load the cookie banner.
showBannerscreen?: stringDisplays the cookie banner dialog. A screen name can be passed in to directly display it. Available screens: cookie-preferences
hideBannerNoneHides the cookie banner dialog.
renewBannerNoneDisplays the cookie banner dialog and resets cookie consent state.
withdrawConsentNoneWithdraw current visitor consent for this website
loadScripturl: string, type: string, position: 'body' | 'head', isAsync?: boolean, callback?: functionLoads a script from a URL. url the absolute path to the script, type defaults to 'text/javascript', position determines where the script element will be added (default to body), async script should load asynchronously or not. callback function to be executed when the script has finished loading.

Example

function onButtonClick() {
window.monsidoConsentManager.showBanner();
}