Skip to content

ConsentModeRule

type ConsentModeRule = {
category: string;
default: "granted" | "denied";
};

Defined in: types.ts:83

Rule that maps one gtag consent key to a Tickbox category.

  • category: the consent category ID (from ConsentConfig.categories) that controls this gtag key. When the category flips granted/denied, the gtag key flips with it.
  • default: the value sent when the category is absent from the user’s stored decisions, or when category itself is omitted. If omitted, defaults to 'denied' for ad/analytics keys and 'granted' for functionality/personalization/security keys.

Type declaration

NameTypeDefined in
category?stringtypes.ts:84
default?"granted" | "denied"types.ts:85