@cashin/js-sdk 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-tracker.d.ts +2 -0
- package/dist/index.cjs +1 -8
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +3 -18
- package/dist/index.global.js +1 -8
- package/dist/index.global.js.map +4 -4
- package/dist/index.js +1 -8
- package/dist/index.js.map +4 -4
- package/dist/shared.d.ts +25 -0
- package/dist/shopify.d.ts +2 -0
- package/package.json +2 -1
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AnalyticsInterface } from '@jitsu/js';
|
|
2
|
+
export declare const WRITE_KEY = "FCPcyGrUKbMlUu65nsX8e2HBCYadBi2b:eE6u4qr1RIUn119gAEliIuzftbpIrbOX";
|
|
3
|
+
export declare const HOST = "https://cmjiyhe5l00003b7ayqcn2bte.d.jitsu.com";
|
|
4
|
+
export interface CashinTracker {
|
|
5
|
+
track(eventName: string, properties?: Record<string, any>): Promise<any>;
|
|
6
|
+
page(name?: string, properties?: Record<string, any>): Promise<any>;
|
|
7
|
+
identify(userId: string, traits?: Record<string, any>): Promise<any>;
|
|
8
|
+
group(groupId: string, traits?: Record<string, any>): Promise<any>;
|
|
9
|
+
reset(): Promise<any>;
|
|
10
|
+
user(): any;
|
|
11
|
+
setAnonymousId(id: string): void;
|
|
12
|
+
setContext(name: string, value: any): void;
|
|
13
|
+
getContext(name: string): any;
|
|
14
|
+
analytics: AnalyticsInterface;
|
|
15
|
+
}
|
|
16
|
+
export interface InitOptions {
|
|
17
|
+
autoTrack?: boolean;
|
|
18
|
+
cookieName?: string;
|
|
19
|
+
getCookie?: (name: string) => Promise<string | null>;
|
|
20
|
+
setCookie?: (name: string, value: string, options?: string) => Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare function getXPath(element: HTMLElement): string;
|
|
23
|
+
export declare function getCssSelector(element: HTMLElement): string;
|
|
24
|
+
export declare function setupAutoTracking(analytics: AnalyticsInterface, getXPath: (el: HTMLElement) => string, getCssSelector: (el: HTMLElement) => string): void;
|
|
25
|
+
export declare function createTracker(analytics: AnalyticsInterface): CashinTracker;
|
package/package.json
CHANGED