UNPKG

1 kBTypeScriptView Raw
1import { ICredentials } from '@aws-amplify/core';
2/**
3 * Analytics instance options
4 */
5export interface AnalyticsOptions {
6 appId: string;
7 platform?: string;
8 clientId?: string;
9 region?: string;
10 credentials?: ICredentials;
11}
12export interface EventAttributes {
13 [key: string]: string;
14}
15export interface EventMetrics {
16 [key: string]: number;
17}
18export interface pageViewTrackOpts {
19 enable: boolean;
20 type?: string;
21 eventName?: string;
22 provider?: string;
23 attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
24 getUrl?: () => string;
25}
26export interface EventTrackOpts {
27 enable: boolean;
28 events?: Array<string>;
29 selectorPrefix?: string;
30 provider?: string;
31 attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
32}
33export interface SessionTrackOpts {
34 enable: boolean;
35 attributes?: EventAttributes | (() => EventAttributes | Promise<EventAttributes>);
36 provider?: string;
37}
38
\No newline at end of file