1 | export class Analytics {
|
2 | constructor(trackingId: string, parameters?: MeasurementParamter, options?: Options);
|
3 | hit(hitObject: PageHit | ScreenHit): Promise<void>;
|
4 | event(event: Event): Promise<void>;
|
5 | addCustomDimension(dimensionIndex: number, tag: string): void;
|
6 | addCustomMetric(metricIndex: number, tag: number): void;
|
7 | removeCustomDimension(dimensionIndex: number): void;
|
8 | removeCustomMetric(metricIndex: number): void;
|
9 | }
|
10 |
|
11 | export interface MeasurementParamter {
|
12 | uid?: string;
|
13 | dr?: string;
|
14 | cn?: string;
|
15 |
|
16 |
|
17 |
|
18 | [key: string]: any;
|
19 | }
|
20 |
|
21 | export interface Options {
|
22 | debug?: boolean;
|
23 | }
|
24 |
|
25 | export class PageHit {
|
26 | constructor(pageName: string);
|
27 | }
|
28 |
|
29 | export class ScreenHit {
|
30 | constructor(screenName: string);
|
31 | }
|
32 |
|
33 | export class Event {
|
34 | constructor(category: string, action: string, label?: string, value?: number);
|
35 | }
|