1 | import { AnalyticsProvider, AnalyticsEvent, AutoTrackSessionOpts, AutoTrackPageViewOpts, AutoTrackEventOpts, PersonalizeAnalyticsEvent, KinesisAnalyticsEvent } from './types';
|
2 | import { PageViewTracker, EventTracker, SessionTracker } from './trackers';
|
3 | declare const trackers: {
|
4 | pageView: typeof PageViewTracker;
|
5 | event: typeof EventTracker;
|
6 | session: typeof SessionTracker;
|
7 | };
|
8 | declare type TrackerTypes = keyof typeof trackers;
|
9 |
|
10 |
|
11 |
|
12 | export declare class AnalyticsClass {
|
13 | private _config;
|
14 | private _pluggables;
|
15 | private _disabled;
|
16 | private _trackers;
|
17 | |
18 |
|
19 |
|
20 |
|
21 | constructor();
|
22 | getModuleName(): string;
|
23 | /**
|
24 | * configure Analytics
|
25 | * @param {Object} config - Configuration of the Analytics
|
26 | */
|
27 | configure(config?: any): any;
|
28 | |
29 |
|
30 |
|
31 |
|
32 | addPluggable(pluggable: AnalyticsProvider): any;
|
33 | |
34 |
|
35 |
|
36 |
|
37 | getPluggable(providerName: string): AnalyticsProvider;
|
38 | |
39 |
|
40 |
|
41 |
|
42 | removePluggable(providerName: string): void;
|
43 | |
44 |
|
45 |
|
46 | disable(): void;
|
47 | |
48 |
|
49 |
|
50 | enable(): void;
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 | startSession(provider?: string): Promise<unknown>;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 | stopSession(provider?: string): Promise<unknown>;
|
63 | |
64 |
|
65 |
|
66 |
|
67 |
|
68 | record(event: AnalyticsEvent | PersonalizeAnalyticsEvent | KinesisAnalyticsEvent, provider?: string): Promise<unknown>;
|
69 | updateEndpoint(attrs: {
|
70 | [key: string]: any;
|
71 | }, provider?: string): Promise<unknown>;
|
72 | private _sendEvent;
|
73 | |
74 |
|
75 |
|
76 |
|
77 |
|
78 | autoTrack(trackerType: 'session', opts: AutoTrackSessionOpts): any;
|
79 | autoTrack(trackerType: 'pageView', opts: AutoTrackPageViewOpts): any;
|
80 | autoTrack(trackerType: 'event', opts: AutoTrackEventOpts): any;
|
81 | autoTrack(trackerType: TrackerTypes, opts: {
|
82 | provider: string;
|
83 | [key: string]: any;
|
84 | }): any;
|
85 | }
|
86 | export declare const Analytics: AnalyticsClass;
|
87 | export {};
|