Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 2.39 KB

File metadata and controls

39 lines (33 loc) · 2.39 KB

Home > @snowplow/react-native-tracker > ReactNativeTracker

ReactNativeTracker type

The ReactNativeTracker type

Signature:

export declare type ReactNativeTracker = {
    readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribingJson<T>, contexts?: EventContext[]) => void;
    readonly trackStructuredEvent: (argmap: StructuredEvent, contexts?: EventContext[]) => void;
    readonly trackPageViewEvent: (argmap: PageViewEvent, contexts?: EventContext[]) => void;
    readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
    readonly trackMessageNotificationEvent: (argmap: MessageNotificationProps, contexts?: EventContext[]) => void;
    addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>): void;
    clearGlobalContexts(): void;
    removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive | string>): void;
    addPlugin(configuration: CorePluginConfiguration): void;
    flush: () => Promise<void>;
    readonly setAppId: (appId: string) => void;
    readonly setPlatform: (value: string) => void;
    readonly setUserId: (newUid: string) => void;
    readonly setNetworkUserId: (newNuid: string | undefined) => void;
    readonly setDomainUserId: (newDuid: string | undefined) => void;
    readonly setIpAddress: (newIp: string) => void;
    readonly setUseragent: (newUagent: string) => void;
    readonly setTimezone: (newTz: string) => void;
    readonly setLanguage: (newLang: string) => void;
    readonly setScreenResolution: (newRes: ScreenSize) => void;
    readonly setScreenViewport: (newView: ScreenSize) => void;
    readonly setColorDepth: (newLang: number) => void;
    readonly setSubjectData: (config: SubjectConfiguration) => void;
};

References: EventContext, TimingProps, MessageNotificationProps, ScreenSize, SubjectConfiguration