getComplianceTypes

The getComplianceTypes() method retrieves a list of consent types for the current setup. A consent type will only appear in the output if at least one tag has it set.

Syntax

ppms.cm.api('getComplianceTypes', onFulfilled, onRejected);

Parameters

onFulfilled(types) (function, required)

The fulfillment handler callback (called with result).

types (string, required)

Array of consent types. Example: ["remarketing", "analytics"].

onRejected(error)

The rejection handler callback (called with error code). If not specified, the exception will be thrown in the main stack trace.

error (string | object, required)

Error code or exception.

Examples

See an example of a custom consent form.