UNPKG

1.12 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { analytics } from '@angular-devkit/core';
9/**
10 * See: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
11 */
12export declare class AnalyticsCollector implements analytics.Analytics {
13 private trackingEventsQueue;
14 private readonly parameters;
15 private readonly analyticsLogDebug;
16 constructor(trackingId: string, userId: string);
17 event(ec: string, ea: string, options?: analytics.EventOptions): void;
18 pageview(dp: string, options?: analytics.PageviewOptions): void;
19 timing(utc: string, utv: string, utt: string | number, options?: analytics.TimingOptions): void;
20 screenview(cd: string, an: string, options?: analytics.ScreenviewOptions): void;
21 flush(): Promise<void>;
22 private addToQueue;
23 private send;
24 /**
25 * Creates the dimension and metrics variables to add to the queue.
26 * @private
27 */
28 private customVariables;
29}