UNPKG

tianji-client-sdk

Version:

40 lines 1.26 kB
import { IdentifyPayload } from '../types'; import { identifyWebsiteUser, initWebsiteTracking, trackPageView, reportWebsiteEvent } from './pure'; export { identifyWebsiteUser, initWebsiteTracking, trackPageView, reportWebsiteEvent, }; interface InjectTrackerOptions { /** * your tianji application website * @example * https://tianji.example.com */ url: string; /** * Website id, you can get it from your tianji dashboard */ websiteId: string; /** * If you modify your tracker name with */ customTrackerName?: string; /** * is auto track route change and dom */ autoTrack?: boolean; /** * Whitelist domains, default will report all website * @example * example.com, www.example.com */ domains?: string[]; disableTrack?: boolean; } export declare function initTianjiTracker(options: InjectTrackerOptions): Promise<HTMLScriptElement | undefined>; /** * @deprecated use reportWebsiteEvent instead */ export declare function reportEvent(eventName: string, data?: Record<string, any>): void; /** * @deprecated use identifyWebsiteUser instead */ export declare function identify(data: IdentifyPayload): void; //# sourceMappingURL=index.d.ts.map