Trigger Collection Points

The following methods are used to control when the Collection Point configuration is attached to the existing web form. Controlling the timing of when the configuration is loaded and attached (installed) is important as it is necessary for the web form elements to already exist on the page when the Collection Point configuration is installed.

Register Event

This method can be used to control when the Collection Point is installed on the web form.

Example Code:

OneTrust.Api.RegisterEvent("{Event type}");

With Command Queue:

OtSdk('consent','RegisterEvent','external')

Event Types:

page-loadConfiguration installed at page load
document-loadConfiguration installed when the DOM is ready
externalConfiguration is installed via ad-hoc method

InstallCP

This method can be used to install the Collection Point to the web form via an adhoc method that can be called at any time.

Note: callback function is optional and it returns true or false.

Example Code:

OneTrust.Api.InstallCP("{collection point id}", {callback function});

With Command Queue:

OtSdk('consent','InstallCP','{collection point id}', {callback function})