devowl-wp
    Preparing search index...

    Type Alias CookieConsentManagerOptions<Transaction>

    type CookieConsentManagerOptions<
        Transaction extends CookieConsentManagerTransaction = any,
    > = {
        cmpId?: number | string;
        cmpVersion?: number | string;
        consentQueueLocalStorageName: string;
        decisionCookieName: string;
        failedConsentDocumentationHandling?: "optimistic" | "essentials";
        gcmCookieName?: string;
        groups: ServiceGroup[];
        isGcm: boolean;
        persistConsent?: (
            transaction: Transaction,
            setCookies?: boolean,
        ) => Promise<string>;
        revisionHash: string;
        setCookiesViaManager: ServiceTagManager;
        skipOptIn?: ApplyOptInOptions["skipOptIn"];
        supportsCookiesName?: string;
        tcfCookieName?: string;
    }

    Type Parameters

    Index

    Properties

    cmpId?: number | string
    cmpVersion?: number | string

    Currently, only two bits (https://git.io/JmuD0) can be saved to the cmpVersion, so we can only save the major version.

    consentQueueLocalStorageName: string

    In this local storage item the queue of pending consents will be saved. See also persistConsent.

    decisionCookieName: string

    The cookie needs to be built in this way: {consent-uuid1}[,{consent-uuid2}...]:{revision-uuid}:{consent-json-stringified}.

    failedConsentDocumentationHandling?: "optimistic" | "essentials"

    When persistConsent fails, it will save the given consent locally in local storage. This allows to respect the user consent even when it could not be documented successfully.

    gcmCookieName?: string
    groups: ServiceGroup[]
    isGcm: boolean

    Is the Google Consent Mode activated?

    persistConsent?: (
        transaction: Transaction,
        setCookies?: boolean,
    ) => Promise<string>

    A callback which receives a transaction (representing a user consent) as argument and it should save the consent to the server. When it throws an error, it will be automatically added to a managed queue which implements a lifecycle to retry the save procedure (see also CookieConsentManager#persistConsent).

    Type declaration

      • (transaction: Transaction, setCookies?: boolean): Promise<string>
      • Parameters

        • transaction: Transaction
        • OptionalsetCookies: boolean

          If true, the server response should return cookies, otherwise not. This is needed for persisting "old" consents which were not saved due to a server error.

        Returns Promise<string>

        The consent UUID

    revisionHash: string

    Current revision hash.

    setCookiesViaManager: ServiceTagManager
    supportsCookiesName?: string
    tcfCookieName?: string