tianji-client-sdk
Version:
33 lines • 956 B
TypeScript
import { IdentifyPayload } from './types';
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>;
export declare function reportEvent(eventName: string, data?: Record<string, any>): void;
export declare function identify(data: IdentifyPayload): void;
export {};
//# sourceMappingURL=tracker.d.ts.map