@firebase/analytics 0.7.10 → 0.7.11-20220621210445
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/CHANGELOG.md +12 -0
- package/dist/analytics-public.d.ts +1 -1
- package/dist/analytics.d.ts +1 -1
- package/dist/esm/index.esm.js +24 -21
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/index.esm2017.js +9 -6
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/esm/src/public-types.d.ts +1 -1
- package/dist/index.cjs.js +24 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/src/public-types.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @firebase/analytics
|
|
2
2
|
|
|
3
|
+
## 0.7.11-20220621210445
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`835f1d46a`](https://github.com/firebase/firebase-js-sdk/commit/835f1d46a6780535bc660ef7dc23293350d5fe43) [#6357](https://github.com/firebase/firebase-js-sdk/pull/6357) - Fix typo in GtagConfigParams
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`efe2000fc`](https://github.com/firebase/firebase-js-sdk/commit/efe2000fc499e2c85c4e5e0fef6741ff3bad2eb0)]:
|
|
10
|
+
- @firebase/util@1.6.2-20220621210445
|
|
11
|
+
- @firebase/app@0.7.27-20220621210445
|
|
12
|
+
- @firebase/component@0.5.16-20220621210445
|
|
13
|
+
- @firebase/installations@0.5.11-20220621210445
|
|
14
|
+
|
|
3
15
|
## 0.7.10
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -195,7 +195,7 @@ export declare interface GtagConfigParams {
|
|
|
195
195
|
* If set to false, disables all advertising features with `gtag.js`.
|
|
196
196
|
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
|
|
197
197
|
*/
|
|
198
|
-
'allow_google_signals
|
|
198
|
+
'allow_google_signals'?: boolean;
|
|
199
199
|
/**
|
|
200
200
|
* If set to false, disables all advertising personalization with `gtag.js`.
|
|
201
201
|
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
|
package/dist/analytics.d.ts
CHANGED
|
@@ -195,7 +195,7 @@ export declare interface GtagConfigParams {
|
|
|
195
195
|
* If set to false, disables all advertising features with `gtag.js`.
|
|
196
196
|
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
|
|
197
197
|
*/
|
|
198
|
-
'allow_google_signals
|
|
198
|
+
'allow_google_signals'?: boolean;
|
|
199
199
|
/**
|
|
200
200
|
* If set to false, disables all advertising personalization with `gtag.js`.
|
|
201
201
|
* See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
|
package/dist/esm/index.esm.js
CHANGED
|
@@ -536,53 +536,55 @@ retryData, timeoutMillis) {
|
|
|
536
536
|
*/
|
|
537
537
|
function attemptFetchDynamicConfigWithRetry(appFields, _a, signal, retryData // for testing
|
|
538
538
|
) {
|
|
539
|
+
var _b, _c;
|
|
539
540
|
var throttleEndTimeMillis = _a.throttleEndTimeMillis, backoffCount = _a.backoffCount;
|
|
540
541
|
if (retryData === void 0) { retryData = defaultRetryData; }
|
|
541
542
|
return __awaiter(this, void 0, void 0, function () {
|
|
542
|
-
var appId, measurementId, e_1, response, e_2, backoffMillis, throttleMetadata;
|
|
543
|
-
return __generator(this, function (
|
|
544
|
-
switch (
|
|
543
|
+
var appId, measurementId, e_1, response, e_2, error, backoffMillis, throttleMetadata;
|
|
544
|
+
return __generator(this, function (_d) {
|
|
545
|
+
switch (_d.label) {
|
|
545
546
|
case 0:
|
|
546
547
|
appId = appFields.appId, measurementId = appFields.measurementId;
|
|
547
|
-
|
|
548
|
+
_d.label = 1;
|
|
548
549
|
case 1:
|
|
549
|
-
|
|
550
|
+
_d.trys.push([1, 3, , 4]);
|
|
550
551
|
return [4 /*yield*/, setAbortableTimeout(signal, throttleEndTimeMillis)];
|
|
551
552
|
case 2:
|
|
552
|
-
|
|
553
|
+
_d.sent();
|
|
553
554
|
return [3 /*break*/, 4];
|
|
554
555
|
case 3:
|
|
555
|
-
e_1 =
|
|
556
|
+
e_1 = _d.sent();
|
|
556
557
|
if (measurementId) {
|
|
557
558
|
logger.warn("Timed out fetching this Firebase app's measurement ID from the server." +
|
|
558
559
|
(" Falling back to the measurement ID " + measurementId) +
|
|
559
|
-
(" provided in the \"measurementId\" field in the local Firebase config. [" + e_1.message + "]"));
|
|
560
|
+
(" provided in the \"measurementId\" field in the local Firebase config. [" + ((_b = e_1) === null || _b === void 0 ? void 0 : _b.message) + "]"));
|
|
560
561
|
return [2 /*return*/, { appId: appId, measurementId: measurementId }];
|
|
561
562
|
}
|
|
562
563
|
throw e_1;
|
|
563
564
|
case 4:
|
|
564
|
-
|
|
565
|
+
_d.trys.push([4, 6, , 7]);
|
|
565
566
|
return [4 /*yield*/, fetchDynamicConfig(appFields)];
|
|
566
567
|
case 5:
|
|
567
|
-
response =
|
|
568
|
+
response = _d.sent();
|
|
568
569
|
// Note the SDK only clears throttle state if response is success or non-retriable.
|
|
569
570
|
retryData.deleteThrottleMetadata(appId);
|
|
570
571
|
return [2 /*return*/, response];
|
|
571
572
|
case 6:
|
|
572
|
-
e_2 =
|
|
573
|
-
|
|
573
|
+
e_2 = _d.sent();
|
|
574
|
+
error = e_2;
|
|
575
|
+
if (!isRetriableError(error)) {
|
|
574
576
|
retryData.deleteThrottleMetadata(appId);
|
|
575
577
|
if (measurementId) {
|
|
576
578
|
logger.warn("Failed to fetch this Firebase app's measurement ID from the server." +
|
|
577
579
|
(" Falling back to the measurement ID " + measurementId) +
|
|
578
|
-
(" provided in the \"measurementId\" field in the local Firebase config. [" +
|
|
580
|
+
(" provided in the \"measurementId\" field in the local Firebase config. [" + (error === null || error === void 0 ? void 0 : error.message) + "]"));
|
|
579
581
|
return [2 /*return*/, { appId: appId, measurementId: measurementId }];
|
|
580
582
|
}
|
|
581
583
|
else {
|
|
582
584
|
throw e_2;
|
|
583
585
|
}
|
|
584
586
|
}
|
|
585
|
-
backoffMillis = Number(
|
|
587
|
+
backoffMillis = Number((_c = error === null || error === void 0 ? void 0 : error.customData) === null || _c === void 0 ? void 0 : _c.httpStatus) === 503
|
|
586
588
|
? calculateBackoffMillis(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)
|
|
587
589
|
: calculateBackoffMillis(backoffCount, retryData.intervalMillis);
|
|
588
590
|
throttleMetadata = {
|
|
@@ -677,10 +679,11 @@ var AnalyticsAbortSignal = /** @class */ (function () {
|
|
|
677
679
|
* limitations under the License.
|
|
678
680
|
*/
|
|
679
681
|
function validateIndexedDB() {
|
|
682
|
+
var _a;
|
|
680
683
|
return __awaiter(this, void 0, void 0, function () {
|
|
681
684
|
var e_1;
|
|
682
|
-
return __generator(this, function (
|
|
683
|
-
switch (
|
|
685
|
+
return __generator(this, function (_b) {
|
|
686
|
+
switch (_b.label) {
|
|
684
687
|
case 0:
|
|
685
688
|
if (!!isIndexedDBAvailable()) return [3 /*break*/, 1];
|
|
686
689
|
logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* INDEXEDDB_UNAVAILABLE */, {
|
|
@@ -688,15 +691,15 @@ function validateIndexedDB() {
|
|
|
688
691
|
}).message);
|
|
689
692
|
return [2 /*return*/, false];
|
|
690
693
|
case 1:
|
|
691
|
-
|
|
694
|
+
_b.trys.push([1, 3, , 4]);
|
|
692
695
|
return [4 /*yield*/, validateIndexedDBOpenable()];
|
|
693
696
|
case 2:
|
|
694
|
-
|
|
697
|
+
_b.sent();
|
|
695
698
|
return [3 /*break*/, 4];
|
|
696
699
|
case 3:
|
|
697
|
-
e_1 =
|
|
700
|
+
e_1 = _b.sent();
|
|
698
701
|
logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* INDEXEDDB_UNAVAILABLE */, {
|
|
699
|
-
errorInfo: e_1
|
|
702
|
+
errorInfo: (_a = e_1) === null || _a === void 0 ? void 0 : _a.toString()
|
|
700
703
|
}).message);
|
|
701
704
|
return [2 /*return*/, false];
|
|
702
705
|
case 4: return [2 /*return*/, true];
|
|
@@ -1244,7 +1247,7 @@ function logEvent(analyticsInstance, eventName, eventParams, options) {
|
|
|
1244
1247
|
}
|
|
1245
1248
|
|
|
1246
1249
|
var name = "@firebase/analytics";
|
|
1247
|
-
var version = "0.7.
|
|
1250
|
+
var version = "0.7.11-20220621210445";
|
|
1248
1251
|
|
|
1249
1252
|
/**
|
|
1250
1253
|
* Firebase Analytics
|