Methods
Cookie banner methods can be invoked via the window.monsidoConsentManager
object.
Name | Arguments | Description |
---|---|---|
init | None | When manualStartup setting is enabled, use this method to manually load the cookie banner. |
showBanner | screen?: string | Displays the cookie banner dialog. A screen name can be passed in to directly display it. Available screens: cookie-preferences |
hideBanner | None | Hides the cookie banner dialog. |
renewBanner | None | Displays the cookie banner dialog and resets cookie consent state. |
withdrawConsent | None | Withdraw current visitor consent for this website |
loadScript | url: string, type: string, position: 'body' | 'head', isAsync?: boolean, callback?: function | Loads 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();
}