Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 3.95 KB

File metadata and controls

54 lines (48 loc) · 3.95 KB

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

ReactNativeTracker type

The ReactNativeTracker type

Signature:

export declare type ReactNativeTracker = {
    namespace: string;
    readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribing<T>, contexts?: EventContext[]) => void;
    readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => void;
    readonly trackScrollChangedEvent: (argmap: ScrollChangedProps, contexts?: EventContext[]) => void;
    readonly trackListItemViewEvent: (argmap: ListItemViewProps, contexts?: EventContext[]) => void;
    readonly trackStructuredEvent: (argmap: StructuredProps, contexts?: EventContext[]) => void;
    readonly trackPageViewEvent: (argmap: PageViewEvent, contexts?: EventContext[]) => void;
    readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
    readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, 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: BrowserPluginConfiguration): 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;
    readonly getSessionUserId: () => Promise<string | undefined>;
    readonly getSessionId: () => Promise<string | undefined>;
    readonly getSessionIndex: () => Promise<number | undefined>;
    readonly getSessionState: () => Promise<SessionState | undefined>;
    readonly getIsInBackground: () => boolean | undefined;
    readonly getBackgroundIndex: () => number | undefined;
    readonly getForegroundIndex: () => number | undefined;
    readonly enablePlatformContext: () => Promise<void>;
    readonly disablePlatformContext: () => void;
    readonly refreshPlatformContext: () => Promise<void>;
};

References: SelfDescribing, EventContext, ScreenViewProps, ScrollChangedProps, ListItemViewProps, StructuredProps, TimingProps, DeepLinkReceivedProps, MessageNotificationProps, ScreenSize, SubjectConfiguration, SessionState