UNPKG

1.7 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2020 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17import { DynamicConfig, Gtag, MinimalDynamicConfig } from '@firebase/analytics-types';
18import { FirebaseInstallations } from '@firebase/installations-types';
19import { FirebaseApp } from '@firebase/app-types';
20/**
21 * Initialize the analytics instance in gtag.js by calling config command with fid.
22 *
23 * NOTE: We combine analytics initialization and setting fid together because we want fid to be
24 * part of the `page_view` event that's sent during the initialization
25 * @param app Firebase app
26 * @param gtagCore The gtag function that's not wrapped.
27 * @param dynamicConfigPromisesList Array of all dynamic config promises.
28 * @param measurementIdToAppId Maps measurementID to appID.
29 * @param installations FirebaseInstallations instance.
30 *
31 * @returns Measurement ID.
32 */
33export declare function initializeIds(app: FirebaseApp, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
34 [key: string]: string;
35}, installations: FirebaseInstallations, gtagCore: Gtag, dataLayerName: string): Promise<string>;