Main class to manage cookie consents within your application.

Type Parameters

Constructors

Properties

BROADCAST_SIGNAL_APPLY_COOKIES: string = "applyCookies"

Methods

  • Parameters

    • options: Pick<{
          type: "essentials" | "all" | "consent";
      } & Pick<CookieConsentManagerOptions, "isGcm" | "setCookiesViaManager" | "groups" | "decisionCookieName"> & ApplyOptInOptions, "type" | "triggeredByOtherTab">

    Returns Promise<void>

  • Returns Partial<{
        buttonClicked: ClickableButtonsNamed;
        createdClientTime: string;
        decision: "essentials" | "all" | DecisionConsentGroups;
        gcmConsent: EServiceTemplateGoogleConsentModeTypes[];
        revision: string;
        tcfString: string;
    }>[]

  • Parameters

    • lock: boolean = false

    Returns string

  • Parameters

    • respectLegitimateInterests: boolean = true

    Returns DecisionConsentGroups

  • Parameters

    • Optional onlyUptoDate: boolean

    Returns false | Decision

  • Parameters

    • Optional set: boolean

    Returns boolean

  • If you have passed a persistConsent as option to the manager constructor, you can use this method. This method wraps your passed callback and if an error occurs, it accordingly handles the error and pushes the transaction into a queue. The queue has a lifecycle to get retried at a later stage when e.g. your server is available again.

    Parameters

    Returns Promise<void>

  • Parameters

    • queue: Partial<{
          buttonClicked: ClickableButtonsNamed;
          createdClientTime: string;
          decision: "essentials" | "all" | DecisionConsentGroups;
          gcmConsent: EServiceTemplateGoogleConsentModeTypes[];
          revision: string;
          tcfString: string;
      }>[]

    Returns void