ConsentConfig
type ConsentConfig = { categories: Record<CategoryId, CategoryDefinition>; cloud: { apiKey: string; endpoint: string; }; consentMode: ConsentModeMapping; jurisdiction: Jurisdiction | "auto"; policy: { url: string; version: string; }; storage: StorageOptions;};Defined in: types.ts:114
Type declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
categories | Record<CategoryId, CategoryDefinition> | Map of category ID to definition. The keys are arbitrary (e.g. ‘analytics’, ‘marketing’). | types.ts:121 |
cloud? | { apiKey: string; endpoint: string; } | Cloud configuration. If omitted, the SDK runs entirely client-side with no telemetry. | types.ts:128 |
cloud.apiKey? | string | - | types.ts:129 |
cloud.endpoint? | string | Override the default ingest endpoint. Useful for self-hosting. | types.ts:131 |
consentMode? | ConsentModeMapping | Override the default Tickbox-category → Google Consent Mode v2 key mapping. Merged shallowly with the built-in defaults. | types.ts:139 |
jurisdiction | Jurisdiction | "auto" | The jurisdiction governing this site, or 'auto' to detect by visitor country. ‘auto’ falls back to the strictest available match. | types.ts:119 |
policy? | { url: string; version: string; } | Versioned policy reference. Audit log entries are tied to a policy version. | types.ts:123 |
policy.url? | string | - | types.ts:125 |
policy.version | string | - | types.ts:124 |
storage? | StorageOptions | Cookie storage options. | types.ts:134 |