1 | import { Title } from '@angular/platform-browser';
|
2 | import { Router } from '@angular/router';
|
3 | import { Angulartics2, AppInsightsSettings } from 'angulartics2';
|
4 | export declare class AppInsightsDefaults implements AppInsightsSettings {
|
5 | userId: any;
|
6 | }
|
7 | export declare class Angulartics2AppInsights {
|
8 | private angulartics2;
|
9 | private title;
|
10 | private router;
|
11 | loadStartTime: number;
|
12 | loadTime: number;
|
13 | metrics: {
|
14 | [name: string]: number;
|
15 | };
|
16 | dimensions: {
|
17 | [name: string]: string;
|
18 | };
|
19 | measurements: {
|
20 | [name: string]: number;
|
21 | };
|
22 | constructor(angulartics2: Angulartics2, title: Title, router: Router);
|
23 | startTracking(): void;
|
24 | startTimer(): void;
|
25 | stopTimer(): void;
|
26 | /**
|
27 | * Page Track in Baidu Analytics
|
28 | *
|
29 | * @param path - Location 'path'
|
30 | *
|
31 | * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackpageview
|
32 | */
|
33 | pageTrack(path: string): void;
|
34 | /**
|
35 | * Log a user action or other occurrence.
|
36 | *
|
37 | * @param name Name to identify this event in the portal.
|
38 | * @param properties Additional data used to filter events and metrics in the portal. Defaults to empty.
|
39 | *
|
40 | * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent
|
41 | */
|
42 | eventTrack(name: string, properties: {
|
43 | [name: string]: string;
|
44 | }): void;
|
45 | /**
|
46 | * Exception Track Event in GA
|
47 | *
|
48 | * @param properties - Comprised of the mandatory fields 'appId' (string), 'appName' (string) and 'appVersion' (string) and
|
49 | * optional fields 'fatal' (boolean) and 'description' (string), error
|
50 | *
|
51 | * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackexception
|
52 | */
|
53 | exceptionTrack(properties: any): void;
|
54 | /**
|
55 | * @link https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#setauthenticatedusercontext
|
56 | */
|
57 | setUsername(userId: string): void;
|
58 | setUserProperties(properties: Partial<{
|
59 | userId: string;
|
60 | accountId: string;
|
61 | }>): void;
|
62 | }
|