web-collect-events
Version:
An sdk for collecting events from web pages
30 lines (29 loc) • 930 B
TypeScript
interface IContext {
userId: string;
name: string;
email: string;
phone: string;
}
declare class GTETWebSDK {
private isPushNotificationScope;
private isCustomEventScope;
private _data;
constructor();
initStorage(): void;
private setData;
private getData;
private removeData;
private checkScope;
handleDocumentClick(e: MouseEvent): void;
registerUser(key: string): void;
sendEventData(): void;
selfAnalyze(): void;
customEvent(eventName: string, data: any): void;
sendCustomEvent(data: any): void;
setContext(userContext: IContext): void;
pushNotification(publicVapidKey: string, api: string, swfile: string): void;
registerServiceWorker(swfile: string): Promise<void>;
sendSubscriptionToServer(publicVapidKey: string, api: string): Promise<void>;
urlBase64ToUint8Array(base64String: string): Uint8Array;
}
export default GTETWebSDK;