@cnaught/analytics-consent-wrapper-cookieyes
Version:
Segment analytics consent wrapper for CookieYes
23 lines (20 loc) • 912 B
TypeScript
import { CreateWrapperSettings, ConsentModel, AnyAnalytics } from '@segment/analytics-consent-tools';
interface CookieYesSettings {
integrationCategoryMappings?: CreateWrapperSettings['integrationCategoryMappings'];
disableConsentChangedEvent?: boolean;
/**
* Override configured consent model
* - `opt-in` (strict/GDPR, default) - wait for explicit consent before loading segment and all destinations.
* - `opt-out` - load segment and all destinations without waiting for explicit consent.
*/
consentModel?: () => ConsentModel;
/**
* Enable debug logging for OneTrust wrapper
*/
enableDebugLogging?: boolean;
}
/**
* Segment analytics wrapper for CookieYes CMP
*/
declare const withCookieYes: <TAnalytics extends AnyAnalytics>(analyticsInstance: TAnalytics, settings?: CookieYesSettings) => TAnalytics;
export { type CookieYesSettings, withCookieYes };