@firebase/analytics 0.10.9 → 0.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.esm2017.js +1241 -1241
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/esm/src/api.d.ts +453 -453
- package/dist/esm/src/api.test.d.ts +17 -17
- package/dist/esm/src/constants.d.ts +32 -32
- package/dist/esm/src/errors.d.ts +57 -57
- package/dist/esm/src/factory.d.ts +74 -74
- package/dist/esm/src/functions.d.ts +85 -85
- package/dist/esm/src/functions.test.d.ts +17 -17
- package/dist/esm/src/get-config.d.ts +72 -72
- package/dist/esm/src/get-config.test.d.ts +17 -17
- package/dist/esm/src/helpers.d.ts +70 -71
- package/dist/esm/src/helpers.test.d.ts +17 -17
- package/dist/esm/src/index.d.ts +14 -14
- package/dist/esm/src/index.test.d.ts +17 -17
- package/dist/esm/src/initialize-analytics.d.ts +36 -36
- package/dist/esm/src/initialize-analytics.test.d.ts +17 -17
- package/dist/esm/src/logger.d.ts +18 -18
- package/dist/esm/src/public-types.d.ts +282 -282
- package/dist/esm/src/types.d.ts +55 -55
- package/dist/esm/testing/get-fake-firebase-services.d.ts +29 -29
- package/dist/esm/testing/gtag-script-util.d.ts +1 -1
- package/dist/esm/testing/integration-tests/integration.d.ts +18 -18
- package/dist/esm/testing/setup.d.ts +17 -17
- package/dist/index.cjs.js +1241 -1241
- package/dist/index.cjs.js.map +1 -1
- package/dist/src/api.d.ts +453 -453
- package/dist/src/api.test.d.ts +17 -17
- package/dist/src/constants.d.ts +32 -32
- package/dist/src/errors.d.ts +57 -57
- package/dist/src/factory.d.ts +74 -74
- package/dist/src/functions.d.ts +85 -85
- package/dist/src/functions.test.d.ts +17 -17
- package/dist/src/get-config.d.ts +72 -72
- package/dist/src/get-config.test.d.ts +17 -17
- package/dist/src/helpers.d.ts +70 -71
- package/dist/src/helpers.test.d.ts +17 -17
- package/dist/src/index.d.ts +14 -14
- package/dist/src/index.test.d.ts +17 -17
- package/dist/src/initialize-analytics.d.ts +36 -36
- package/dist/src/initialize-analytics.test.d.ts +17 -17
- package/dist/src/logger.d.ts +18 -18
- package/dist/src/public-types.d.ts +282 -282
- package/dist/src/types.d.ts +55 -55
- package/dist/testing/get-fake-firebase-services.d.ts +29 -29
- package/dist/testing/gtag-script-util.d.ts +1 -1
- package/dist/testing/integration-tests/integration.d.ts +18 -18
- package/dist/testing/setup.d.ts +17 -17
- package/package.json +7 -7
|
@@ -1,72 +1,72 @@
|
|
|
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
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* @fileoverview Most logic is copied from packages/remote-config/src/client/retrying_client.ts
|
|
19
|
-
*/
|
|
20
|
-
import { FirebaseApp } from '@firebase/app';
|
|
21
|
-
import { DynamicConfig, ThrottleMetadata, MinimalDynamicConfig } from './types';
|
|
22
|
-
export interface AppFields {
|
|
23
|
-
appId: string;
|
|
24
|
-
apiKey: string;
|
|
25
|
-
measurementId?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Backoff factor for 503 errors, which we want to be conservative about
|
|
29
|
-
* to avoid overloading servers. Each retry interval will be
|
|
30
|
-
* BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one
|
|
31
|
-
* will be ~30 seconds (with fuzzing).
|
|
32
|
-
*/
|
|
33
|
-
export declare const LONG_RETRY_FACTOR = 30;
|
|
34
|
-
/**
|
|
35
|
-
* Stubbable retry data storage class.
|
|
36
|
-
*/
|
|
37
|
-
declare class RetryData {
|
|
38
|
-
throttleMetadata: {
|
|
39
|
-
[appId: string]: ThrottleMetadata;
|
|
40
|
-
};
|
|
41
|
-
intervalMillis: number;
|
|
42
|
-
constructor(throttleMetadata?: {
|
|
43
|
-
[appId: string]: ThrottleMetadata;
|
|
44
|
-
}, intervalMillis?: number);
|
|
45
|
-
getThrottleMetadata(appId: string): ThrottleMetadata;
|
|
46
|
-
setThrottleMetadata(appId: string, metadata: ThrottleMetadata): void;
|
|
47
|
-
deleteThrottleMetadata(appId: string): void;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Fetches dynamic config from backend.
|
|
51
|
-
* @param app Firebase app to fetch config for.
|
|
52
|
-
*/
|
|
53
|
-
export declare function fetchDynamicConfig(appFields: AppFields): Promise<DynamicConfig>;
|
|
54
|
-
/**
|
|
55
|
-
* Fetches dynamic config from backend, retrying if failed.
|
|
56
|
-
* @param app Firebase app to fetch config for.
|
|
57
|
-
*/
|
|
58
|
-
export declare function fetchDynamicConfigWithRetry(app: FirebaseApp, retryData?: RetryData, timeoutMillis?: number): Promise<DynamicConfig | MinimalDynamicConfig>;
|
|
59
|
-
/**
|
|
60
|
-
* Shims a minimal AbortSignal (copied from Remote Config).
|
|
61
|
-
*
|
|
62
|
-
* <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects
|
|
63
|
-
* of networking, such as retries. Firebase doesn't use AbortController enough to justify a
|
|
64
|
-
* polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be
|
|
65
|
-
* swapped out if/when we do.
|
|
66
|
-
*/
|
|
67
|
-
export declare class AnalyticsAbortSignal {
|
|
68
|
-
listeners: Array<() => void>;
|
|
69
|
-
addEventListener(listener: () => void): void;
|
|
70
|
-
abort(): void;
|
|
71
|
-
}
|
|
72
|
-
export {};
|
|
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
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview Most logic is copied from packages/remote-config/src/client/retrying_client.ts
|
|
19
|
+
*/
|
|
20
|
+
import { FirebaseApp } from '@firebase/app';
|
|
21
|
+
import { DynamicConfig, ThrottleMetadata, MinimalDynamicConfig } from './types';
|
|
22
|
+
export interface AppFields {
|
|
23
|
+
appId: string;
|
|
24
|
+
apiKey: string;
|
|
25
|
+
measurementId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Backoff factor for 503 errors, which we want to be conservative about
|
|
29
|
+
* to avoid overloading servers. Each retry interval will be
|
|
30
|
+
* BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one
|
|
31
|
+
* will be ~30 seconds (with fuzzing).
|
|
32
|
+
*/
|
|
33
|
+
export declare const LONG_RETRY_FACTOR = 30;
|
|
34
|
+
/**
|
|
35
|
+
* Stubbable retry data storage class.
|
|
36
|
+
*/
|
|
37
|
+
declare class RetryData {
|
|
38
|
+
throttleMetadata: {
|
|
39
|
+
[appId: string]: ThrottleMetadata;
|
|
40
|
+
};
|
|
41
|
+
intervalMillis: number;
|
|
42
|
+
constructor(throttleMetadata?: {
|
|
43
|
+
[appId: string]: ThrottleMetadata;
|
|
44
|
+
}, intervalMillis?: number);
|
|
45
|
+
getThrottleMetadata(appId: string): ThrottleMetadata;
|
|
46
|
+
setThrottleMetadata(appId: string, metadata: ThrottleMetadata): void;
|
|
47
|
+
deleteThrottleMetadata(appId: string): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Fetches dynamic config from backend.
|
|
51
|
+
* @param app Firebase app to fetch config for.
|
|
52
|
+
*/
|
|
53
|
+
export declare function fetchDynamicConfig(appFields: AppFields): Promise<DynamicConfig>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetches dynamic config from backend, retrying if failed.
|
|
56
|
+
* @param app Firebase app to fetch config for.
|
|
57
|
+
*/
|
|
58
|
+
export declare function fetchDynamicConfigWithRetry(app: FirebaseApp, retryData?: RetryData, timeoutMillis?: number): Promise<DynamicConfig | MinimalDynamicConfig>;
|
|
59
|
+
/**
|
|
60
|
+
* Shims a minimal AbortSignal (copied from Remote Config).
|
|
61
|
+
*
|
|
62
|
+
* <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects
|
|
63
|
+
* of networking, such as retries. Firebase doesn't use AbortController enough to justify a
|
|
64
|
+
* polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be
|
|
65
|
+
* swapped out if/when we do.
|
|
66
|
+
*/
|
|
67
|
+
export declare class AnalyticsAbortSignal {
|
|
68
|
+
listeners: Array<() => void>;
|
|
69
|
+
addEventListener(listener: () => void): void;
|
|
70
|
+
abort(): void;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
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
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
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
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* @param
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export declare function findGtagScriptOnPage(dataLayerName: string): HTMLScriptElement | null;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
17
|
+
import { DynamicConfig, DataLayer, Gtag, MinimalDynamicConfig } from './types';
|
|
18
|
+
/**
|
|
19
|
+
* Verifies and creates a TrustedScriptURL.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createGtagTrustedTypesScriptURL(url: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Makeshift polyfill for Promise.allSettled(). Resolves when all promises
|
|
24
|
+
* have either resolved or rejected.
|
|
25
|
+
*
|
|
26
|
+
* @param promises Array of promises to wait for.
|
|
27
|
+
*/
|
|
28
|
+
export declare function promiseAllSettled<T>(promises: Array<Promise<T>>): Promise<T[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.
|
|
31
|
+
*
|
|
32
|
+
* @param policyName A string containing the name of the policy
|
|
33
|
+
* @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods
|
|
34
|
+
* | the TrustedTypePolicy reference documentation}.
|
|
35
|
+
*/
|
|
36
|
+
export declare function createTrustedTypesPolicy(policyName: string, policyOptions: Partial<TrustedTypePolicyOptions>): Partial<TrustedTypePolicy> | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Inserts gtag script tag into the page to asynchronously download gtag.
|
|
39
|
+
* @param dataLayerName Name of datalayer (most often the default, "_dataLayer").
|
|
40
|
+
*/
|
|
41
|
+
export declare function insertScriptTag(dataLayerName: string, measurementId: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Get reference to, or create, global datalayer.
|
|
44
|
+
* @param dataLayerName Name of datalayer (most often the default, "_dataLayer").
|
|
45
|
+
*/
|
|
46
|
+
export declare function getOrCreateDataLayer(dataLayerName: string): DataLayer;
|
|
47
|
+
/**
|
|
48
|
+
* Creates global gtag function or wraps existing one if found.
|
|
49
|
+
* This wrapped function attaches Firebase instance ID (FID) to gtag 'config' and
|
|
50
|
+
* 'event' calls that belong to the GAID associated with this Firebase instance.
|
|
51
|
+
*
|
|
52
|
+
* @param initializationPromisesMap Map of appIds to their initialization promises.
|
|
53
|
+
* @param dynamicConfigPromisesList Array of dynamic config fetch promises.
|
|
54
|
+
* @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.
|
|
55
|
+
* @param dataLayerName Name of global GA datalayer array.
|
|
56
|
+
* @param gtagFunctionName Name of global gtag function ("gtag" if not user-specified).
|
|
57
|
+
*/
|
|
58
|
+
export declare function wrapOrCreateGtag(initializationPromisesMap: {
|
|
59
|
+
[appId: string]: Promise<string>;
|
|
60
|
+
}, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
|
|
61
|
+
[measurementId: string]: string;
|
|
62
|
+
}, dataLayerName: string, gtagFunctionName: string): {
|
|
63
|
+
gtagCore: Gtag;
|
|
64
|
+
wrappedGtag: Gtag;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Returns the script tag in the DOM matching both the gtag url pattern
|
|
68
|
+
* and the provided data layer name.
|
|
69
|
+
*/
|
|
70
|
+
export declare function findGtagScriptOnPage(dataLayerName: string): HTMLScriptElement | null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Firebase Analytics Web SDK.
|
|
3
|
-
* This SDK does not work in a Node.js environment.
|
|
4
|
-
*
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
import '@firebase/installations';
|
|
8
|
-
declare global {
|
|
9
|
-
interface Window {
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export * from './api';
|
|
14
|
-
export * from './public-types';
|
|
1
|
+
/**
|
|
2
|
+
* The Firebase Analytics Web SDK.
|
|
3
|
+
* This SDK does not work in a Node.js environment.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import '@firebase/installations';
|
|
8
|
+
declare global {
|
|
9
|
+
interface Window {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export * from './api';
|
|
14
|
+
export * from './public-types';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,36 +1,36 @@
|
|
|
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
|
-
*/
|
|
17
|
-
import { DynamicConfig, Gtag, MinimalDynamicConfig } from './types';
|
|
18
|
-
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
|
19
|
-
import { FirebaseApp } from '@firebase/app';
|
|
20
|
-
import { AnalyticsSettings } from './public-types';
|
|
21
|
-
/**
|
|
22
|
-
* Initialize the analytics instance in gtag.js by calling config command with fid.
|
|
23
|
-
*
|
|
24
|
-
* NOTE: We combine analytics initialization and setting fid together because we want fid to be
|
|
25
|
-
* part of the `page_view` event that's sent during the initialization
|
|
26
|
-
* @param app Firebase app
|
|
27
|
-
* @param gtagCore The gtag function that's not wrapped.
|
|
28
|
-
* @param dynamicConfigPromisesList Array of all dynamic config promises.
|
|
29
|
-
* @param measurementIdToAppId Maps measurementID to appID.
|
|
30
|
-
* @param installations _FirebaseInstallationsInternal instance.
|
|
31
|
-
*
|
|
32
|
-
* @returns Measurement ID.
|
|
33
|
-
*/
|
|
34
|
-
export declare function _initializeAnalytics(app: FirebaseApp, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
|
|
35
|
-
[key: string]: string;
|
|
36
|
-
}, installations: _FirebaseInstallationsInternal, gtagCore: Gtag, dataLayerName: string, options?: AnalyticsSettings): Promise<string>;
|
|
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
|
+
*/
|
|
17
|
+
import { DynamicConfig, Gtag, MinimalDynamicConfig } from './types';
|
|
18
|
+
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
|
19
|
+
import { FirebaseApp } from '@firebase/app';
|
|
20
|
+
import { AnalyticsSettings } from './public-types';
|
|
21
|
+
/**
|
|
22
|
+
* Initialize the analytics instance in gtag.js by calling config command with fid.
|
|
23
|
+
*
|
|
24
|
+
* NOTE: We combine analytics initialization and setting fid together because we want fid to be
|
|
25
|
+
* part of the `page_view` event that's sent during the initialization
|
|
26
|
+
* @param app Firebase app
|
|
27
|
+
* @param gtagCore The gtag function that's not wrapped.
|
|
28
|
+
* @param dynamicConfigPromisesList Array of all dynamic config promises.
|
|
29
|
+
* @param measurementIdToAppId Maps measurementID to appID.
|
|
30
|
+
* @param installations _FirebaseInstallationsInternal instance.
|
|
31
|
+
*
|
|
32
|
+
* @returns Measurement ID.
|
|
33
|
+
*/
|
|
34
|
+
export declare function _initializeAnalytics(app: FirebaseApp, dynamicConfigPromisesList: Array<Promise<DynamicConfig | MinimalDynamicConfig>>, measurementIdToAppId: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
}, installations: _FirebaseInstallationsInternal, gtagCore: Gtag, dataLayerName: string, options?: AnalyticsSettings): Promise<string>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
package/dist/esm/src/logger.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 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
|
-
*/
|
|
17
|
-
import { Logger } from '@firebase/logger';
|
|
18
|
-
export declare const logger: Logger;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
17
|
+
import { Logger } from '@firebase/logger';
|
|
18
|
+
export declare const logger: Logger;
|