@segment/analytics-consent-wrapper-onetrust
Version:
<img src="img/onetrust-popup.jpg" width="500" />
22 lines • 1.1 kB
TypeScript
import { AnyAnalytics, CreateWrapperSettings } from '@segment/analytics-consent-tools';
export interface OneTrustSettings {
integrationCategoryMappings?: CreateWrapperSettings['integrationCategoryMappings'];
disableConsentChangedEvent?: boolean;
/**
* Override configured consent model
* - `opt-in` (strict/GDPR) - wait for explicit consent before loading segment and all destinations.
* - `opt-out` (default) - load segment and all destinations without waiting for explicit consent.
*/
consentModel?: () => 'opt-in' | 'opt-out';
/**
* Enable debug logging for OneTrust wrapper
*/
enableDebugLogging?: boolean;
}
/**
*
* @param analyticsInstance - An analytics instance. Either `window.analytics`, or the instance returned by `new AnalyticsBrowser()` or `AnalyticsBrowser.load({...})`
* @param settings - Optional settings for configuring your OneTrust wrapper
*/
export declare const withOneTrust: <Analytics extends AnyAnalytics>(analyticsInstance: Analytics, settings?: OneTrustSettings) => Analytics;
//# sourceMappingURL=wrapper.d.ts.map