CMP Events

In order to get notifications when certain events occur, you can use the following JavaScript Methods:

  • __cmp("addEventListener",["eventname",callableFunction,capture],null)
  • __cmp("removeEventListener",["eventname",callableFunction,capture],null)

The CMP can call the following events:




CMP code is loaded and the stub code has been removed. At this stage the CMP has no information about the consent yet.


CMP finished loading its settings. If a consent string existed already, the consent data can now be read from the CMP.


CMP shows the consent screen


CMP removes the consent screen


CMP has gathered consent or a preexisting cookie was found. Consent data can now be read from the CMP.


Visitor gave positive consent to all vendors/purposes


Visitor rejected all vendors and purposes


Visitor gave custom consent (accepts and rejections)

Event handler are defined as:

var handler = function (eventname, cmpobject){…} 


  function getInfos(e,o)
    /*... do something ...*/
Back to top