Custom Functions
Custom Functions are designed to control the behavior of the cookie consent banner programmatically or read the current state of user consent.
- Show cookie preference banner
MandatlyCookie.Show() – It shows the cookie preference banner. - Withdraw consent
MandatlyCookie.Withdraw() – It declines all the cookies except essential cookies. - Get accepted category
MandatlyCookie.GetAcceptedCategory() – To get accepted categories data to perform a custom operation based on accepted cookie categories.
Code Example
Show cookie preference banner
<a href="javascript: MandatlyCookie.Show()">Manage Cookie Preferences</a> |