/** * Consent Mode v2 bridge. * * Maps vTilt's 3-boolean consent (analytics / marketing / advertising) to * Google's 4-key Consent Mode v2 payload (ad_storage, ad_user_data, * ad_personalization, analytics_storage) and pushes it through gtag. * * Mapping (default): * advertising -> ad_storage + ad_user_data + ad_personalization * analytics -> analytics_storage * marketing is not sent to Google by default (it covers email/SMS, not ads). * * Admin UI may override individual keys (`consentOverride`) to hard-wire a * specific value regardless of user consent — useful for jurisdictions or * projects with fixed policies. */ import type { ConsentState } from "../../core/consent"; import type { GoogleConsentOverride } from "../../types"; export type GtagFn = (...args: unknown[]) => void; export type GoogleConsentPayload = Record<"ad_storage" | "ad_user_data" | "ad_personalization" | "analytics_storage", "granted" | "denied">; export declare function buildConsentPayload(consent: ConsentState, override?: GoogleConsentOverride): GoogleConsentPayload; /** * Send the default consent state BEFORE gtag.js loads so that every * subsequent request carries the right flags. Call once at feature start. */ export declare function pushConsentDefault(gtag: GtagFn, consent: ConsentState, override?: GoogleConsentOverride): void; export declare function pushConsentUpdate(gtag: GtagFn, consent: ConsentState, override?: GoogleConsentOverride): void;