Skip to content

JavaScript Reference

Our script exposes a number of functions and properties that can be used to programmatically control the consent solution.

In all of these, the consent categories that we support are handled:

  • undefined = Undefined cookies that have not yet been defined in our application.
  • necessary = Strictly necessary cookies
  • functional = Functional cookies
  • statistical = Statistical cookies
  • marketing = Marketing cookies

Below is a reference of the methods we officially support, any usage beyond this is not officially supported and its functionality will not be guaranteed. This includes things like reading our cookie directly or extracting other information from properties not listed below. If you have a need that is not covered by our current API surface, please contact us and we will do our best to find an official way to support it.


This method opens the cookie dialog in the visitor's browser.


This function returns true/false based on whether a consent for the current category exists.


Adds a consent for the current category. This method can be called with a string or with an array of strings if several categories are to be added.


Removes/revokes consent for the given category alias.


Contains the visitor's unique consent key/id.


An array of strings with categoryAlias for the consents currently given by the visitor.


An array of strings with categoryAlias for all categories available on the current website. This is not the visitor's choice but only a reference list of the categories used on the site.


Properties that contain string representations of our cookie category aliases.


Removes our consent cookie from the visitor's browser


Helper method that attempts to delete a cookie with the name from the method parameter cookieName.