Custom Functions are designed to control the behavior of the cookie consent banner programmatically or read the current state of user consent.

  1. Show cookie preference banner
    MandatlyCookie.Show() – It shows the cookie preference banner.
  2. Withdraw consent
    MandatlyCookie.Withdraw() – It declines all the cookies except essential cookies.
  3. 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>