@depup/firebase__analytics-compat 0.2.26-depup.0

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/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @depup/firebase__analytics-compat
2
+
3
+ > Dependency-bumped version of [@firebase/analytics-compat](https://www.npmjs.com/package/@firebase/analytics-compat)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/firebase__analytics-compat
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [@firebase/analytics-compat](https://www.npmjs.com/package/@firebase/analytics-compat) @ 0.2.26 |
17
+ | Processed | 2026-03-17 |
18
+ | Smoke test | failed |
19
+ | Deps updated | 1 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | tslib | ^2.1.0 | ^2.8.1 |
26
+
27
+ ---
28
+
29
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/@firebase/analytics-compat
30
+
31
+ License inherited from the original package.
package/changes.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "bumped": {
3
+ "tslib": {
4
+ "from": "^2.1.0",
5
+ "to": "^2.8.1"
6
+ }
7
+ },
8
+ "timestamp": "2026-03-17T16:31:17.956Z",
9
+ "totalUpdated": 1
10
+ }
@@ -0,0 +1,145 @@
1
+ import firebase from '@firebase/app-compat';
2
+ import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsCollectionEnabled, settings, isSupported } from '@firebase/analytics';
3
+ import { Component } from '@firebase/component';
4
+
5
+ const name = "@firebase/analytics-compat";
6
+ const version = "0.2.26";
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2020 Google LLC
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ class AnalyticsService {
25
+ constructor(app, _delegate) {
26
+ this.app = app;
27
+ this._delegate = _delegate;
28
+ }
29
+ logEvent(eventName, eventParams, options) {
30
+ logEvent(this._delegate, eventName, eventParams, options);
31
+ }
32
+ /**
33
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
34
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
35
+ */
36
+ setCurrentScreen(screenName, options) {
37
+ setCurrentScreen(this._delegate, screenName, options);
38
+ }
39
+ setUserId(id, options) {
40
+ setUserId(this._delegate, id, options);
41
+ }
42
+ setUserProperties(properties, options) {
43
+ setUserProperties(this._delegate, properties, options);
44
+ }
45
+ setAnalyticsCollectionEnabled(enabled) {
46
+ setAnalyticsCollectionEnabled(this._delegate, enabled);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * @license
52
+ * Copyright 2021 Google LLC
53
+ *
54
+ * Licensed under the Apache License, Version 2.0 (the "License");
55
+ * you may not use this file except in compliance with the License.
56
+ * You may obtain a copy of the License at
57
+ *
58
+ * http://www.apache.org/licenses/LICENSE-2.0
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software
61
+ * distributed under the License is distributed on an "AS IS" BASIS,
62
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ * See the License for the specific language governing permissions and
64
+ * limitations under the License.
65
+ */
66
+ /**
67
+ * Officially recommended event names for gtag.js
68
+ * Any other string is also allowed.
69
+ */
70
+ var EventName;
71
+ (function (EventName) {
72
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
73
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
74
+ EventName["ADD_TO_CART"] = "add_to_cart";
75
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
76
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
77
+ /**
78
+ * @deprecated
79
+ * This event name is deprecated and is unsupported in updated
80
+ * Enhanced Ecommerce reports.
81
+ */
82
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
83
+ EventName["EXCEPTION"] = "exception";
84
+ EventName["GENERATE_LEAD"] = "generate_lead";
85
+ EventName["LOGIN"] = "login";
86
+ EventName["PAGE_VIEW"] = "page_view";
87
+ EventName["PURCHASE"] = "purchase";
88
+ EventName["REFUND"] = "refund";
89
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
90
+ EventName["SCREEN_VIEW"] = "screen_view";
91
+ EventName["SEARCH"] = "search";
92
+ EventName["SELECT_CONTENT"] = "select_content";
93
+ EventName["SELECT_ITEM"] = "select_item";
94
+ EventName["SELECT_PROMOTION"] = "select_promotion";
95
+ /** @deprecated */
96
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
97
+ EventName["SHARE"] = "share";
98
+ EventName["SIGN_UP"] = "sign_up";
99
+ EventName["TIMING_COMPLETE"] = "timing_complete";
100
+ EventName["VIEW_CART"] = "view_cart";
101
+ EventName["VIEW_ITEM"] = "view_item";
102
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
103
+ EventName["VIEW_PROMOTION"] = "view_promotion";
104
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
105
+ })(EventName || (EventName = {}));
106
+
107
+ /**
108
+ * @license
109
+ * Copyright 2021 Google LLC
110
+ *
111
+ * Licensed under the Apache License, Version 2.0 (the "License");
112
+ * you may not use this file except in compliance with the License.
113
+ * You may obtain a copy of the License at
114
+ *
115
+ * http://www.apache.org/licenses/LICENSE-2.0
116
+ *
117
+ * Unless required by applicable law or agreed to in writing, software
118
+ * distributed under the License is distributed on an "AS IS" BASIS,
119
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120
+ * See the License for the specific language governing permissions and
121
+ * limitations under the License.
122
+ */
123
+ const factory = (container) => {
124
+ // Dependencies
125
+ const app = container.getProvider('app-compat').getImmediate();
126
+ const analyticsServiceExp = container.getProvider('analytics').getImmediate();
127
+ return new AnalyticsService(app, analyticsServiceExp);
128
+ };
129
+ function registerAnalytics() {
130
+ const namespaceExports = {
131
+ Analytics: AnalyticsService,
132
+ settings: settings,
133
+ isSupported: isSupported,
134
+ // We removed this enum in exp so need to re-create it here for compat.
135
+ EventName
136
+ };
137
+ firebase.INTERNAL.registerComponent(new Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
138
+ .setServiceProps(namespaceExports)
139
+ .setMultipleInstances(true));
140
+ }
141
+ registerAnalytics();
142
+ firebase.registerVersion(name, version);
143
+
144
+ export { registerAnalytics };
145
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/service.ts","../../src/constants.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AnalyticsCallOptions,\n CustomParams,\n EventParams,\n FirebaseAnalytics\n} from '@firebase/analytics-types';\nimport {\n Analytics as AnalyticsServiceExp,\n logEvent as logEventExp,\n setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabledExp,\n setCurrentScreen as setCurrentScreenExp,\n setUserId as setUserIdExp,\n setUserProperties as setUserPropertiesExp\n} from '@firebase/analytics';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\n\nexport class AnalyticsService implements FirebaseAnalytics, _FirebaseService {\n constructor(\n public app: FirebaseApp,\n readonly _delegate: AnalyticsServiceExp\n ) {}\n\n logEvent(\n eventName: string,\n eventParams?: EventParams | CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n logEventExp(this._delegate, eventName as '', eventParams, options);\n }\n\n /**\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\n */\n setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void {\n setCurrentScreenExp(this._delegate, screenName, options);\n }\n\n setUserId(id: string, options?: AnalyticsCallOptions): void {\n setUserIdExp(this._delegate, id, options);\n }\n\n setUserProperties(\n properties: CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n setUserPropertiesExp(this._delegate, properties, options);\n }\n\n setAnalyticsCollectionEnabled(enabled: boolean): void {\n setAnalyticsCollectionEnabledExp(this._delegate, enabled);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Officially recommended event names for gtag.js\n * Any other string is also allowed.\n */\nexport enum EventName {\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * @deprecated\n * This event name is deprecated and is unsupported in updated\n * Enhanced Ecommerce reports.\n */\n CHECKOUT_PROGRESS = 'checkout_progress',\n EXCEPTION = 'exception',\n GENERATE_LEAD = 'generate_lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n REMOVE_FROM_CART = 'remove_from_cart',\n SCREEN_VIEW = 'screen_view',\n SEARCH = 'search',\n SELECT_CONTENT = 'select_content',\n SELECT_ITEM = 'select_item',\n SELECT_PROMOTION = 'select_promotion',\n /** @deprecated */\n SET_CHECKOUT_OPTION = 'set_checkout_option',\n SHARE = 'share',\n SIGN_UP = 'sign_up',\n TIMING_COMPLETE = 'timing_complete',\n VIEW_CART = 'view_cart',\n VIEW_ITEM = 'view_item',\n VIEW_ITEM_LIST = 'view_item_list',\n VIEW_PROMOTION = 'view_promotion',\n VIEW_SEARCH_RESULTS = 'view_search_results'\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { FirebaseAnalytics } from '@firebase/analytics-types';\nimport { name, version } from '../package.json';\nimport { AnalyticsService } from './service';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport {\n settings as settingsExp,\n isSupported as isSupportedExp\n} from '@firebase/analytics';\nimport { EventName } from './constants';\n\nconst factory: InstanceFactory<'analytics-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const analyticsServiceExp = container.getProvider('analytics').getImmediate();\n\n return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);\n};\n\nexport function registerAnalytics(): void {\n const namespaceExports = {\n Analytics: AnalyticsService,\n settings: settingsExp,\n isSupported: isSupportedExp,\n // We removed this enum in exp so need to re-create it here for compat.\n EventName\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('analytics-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n\nregisterAnalytics();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAnalytics`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n analytics(app?: FirebaseApp): FirebaseAnalytics;\n }\n interface FirebaseApp {\n analytics(): FirebaseAnalytics;\n }\n}\n"],"names":["logEventExp","setCurrentScreenExp","setUserIdExp","setUserPropertiesExp","setAnalyticsCollectionEnabledExp","settingsExp","isSupportedExp"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAkBU,gBAAgB,CAAA;IAC3B,WACS,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;KACrC;AAEJ,IAAA,QAAQ,CACN,SAAiB,EACjB,WAAwC,EACxC,OAA8B,EAAA;QAE9BA,QAAW,CAAC,IAAI,CAAC,SAAS,EAAE,SAAe,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;KACpE;AAED;;;AAGG;IACH,gBAAgB,CAAC,UAAkB,EAAE,OAA8B,EAAA;QACjEC,gBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC1D;IAED,SAAS,CAAC,EAAU,EAAE,OAA8B,EAAA;QAClDC,SAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KAC3C;IAED,iBAAiB,CACf,UAAwB,EACxB,OAA8B,EAAA;QAE9BC,iBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,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A;SAC7D,eAAe,CAAC,gBAAgB,CAAC;AACjC,SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,iBAAiB,EAAE,CAAC;AACpB,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 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
+ * Officially recommended event names for gtag.js
19
+ * Any other string is also allowed.
20
+ */
21
+ export declare enum EventName {
22
+ ADD_SHIPPING_INFO = "add_shipping_info",
23
+ ADD_PAYMENT_INFO = "add_payment_info",
24
+ ADD_TO_CART = "add_to_cart",
25
+ ADD_TO_WISHLIST = "add_to_wishlist",
26
+ BEGIN_CHECKOUT = "begin_checkout",
27
+ /**
28
+ * @deprecated
29
+ * This event name is deprecated and is unsupported in updated
30
+ * Enhanced Ecommerce reports.
31
+ */
32
+ CHECKOUT_PROGRESS = "checkout_progress",
33
+ EXCEPTION = "exception",
34
+ GENERATE_LEAD = "generate_lead",
35
+ LOGIN = "login",
36
+ PAGE_VIEW = "page_view",
37
+ PURCHASE = "purchase",
38
+ REFUND = "refund",
39
+ REMOVE_FROM_CART = "remove_from_cart",
40
+ SCREEN_VIEW = "screen_view",
41
+ SEARCH = "search",
42
+ SELECT_CONTENT = "select_content",
43
+ SELECT_ITEM = "select_item",
44
+ SELECT_PROMOTION = "select_promotion",
45
+ /** @deprecated */
46
+ SET_CHECKOUT_OPTION = "set_checkout_option",
47
+ SHARE = "share",
48
+ SIGN_UP = "sign_up",
49
+ TIMING_COMPLETE = "timing_complete",
50
+ VIEW_CART = "view_cart",
51
+ VIEW_ITEM = "view_item",
52
+ VIEW_ITEM_LIST = "view_item_list",
53
+ VIEW_PROMOTION = "view_promotion",
54
+ VIEW_SEARCH_RESULTS = "view_search_results"
55
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 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 { FirebaseAnalytics } from '@firebase/analytics-types';
18
+ export declare function registerAnalytics(): void;
19
+ /**
20
+ * Define extension behavior of `registerAnalytics`
21
+ */
22
+ declare module '@firebase/app-compat' {
23
+ interface FirebaseNamespace {
24
+ analytics(app?: FirebaseApp): FirebaseAnalytics;
25
+ }
26
+ interface FirebaseApp {
27
+ analytics(): FirebaseAnalytics;
28
+ }
29
+ }
@@ -0,0 +1,33 @@
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 { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types';
18
+ import { Analytics as AnalyticsServiceExp } from '@firebase/analytics';
19
+ import { _FirebaseService, FirebaseApp } from '@firebase/app-compat';
20
+ export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService {
21
+ app: FirebaseApp;
22
+ readonly _delegate: AnalyticsServiceExp;
23
+ constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp);
24
+ logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void;
25
+ /**
26
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
27
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
28
+ */
29
+ setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
30
+ setUserId(id: string, options?: AnalyticsCallOptions): void;
31
+ setUserProperties(properties: CustomParams, options?: AnalyticsCallOptions): void;
32
+ setAnalyticsCollectionEnabled(enabled: boolean): void;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,153 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var firebase = require('@firebase/app-compat');
6
+ var analytics = require('@firebase/analytics');
7
+ var component = require('@firebase/component');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
12
+
13
+ const name = "@firebase/analytics-compat";
14
+ const version = "0.2.26";
15
+
16
+ /**
17
+ * @license
18
+ * Copyright 2020 Google LLC
19
+ *
20
+ * Licensed under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License.
22
+ * You may obtain a copy of the License at
23
+ *
24
+ * http://www.apache.org/licenses/LICENSE-2.0
25
+ *
26
+ * Unless required by applicable law or agreed to in writing, software
27
+ * distributed under the License is distributed on an "AS IS" BASIS,
28
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
+ * See the License for the specific language governing permissions and
30
+ * limitations under the License.
31
+ */
32
+ class AnalyticsService {
33
+ constructor(app, _delegate) {
34
+ this.app = app;
35
+ this._delegate = _delegate;
36
+ }
37
+ logEvent(eventName, eventParams, options) {
38
+ analytics.logEvent(this._delegate, eventName, eventParams, options);
39
+ }
40
+ /**
41
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
42
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
43
+ */
44
+ setCurrentScreen(screenName, options) {
45
+ analytics.setCurrentScreen(this._delegate, screenName, options);
46
+ }
47
+ setUserId(id, options) {
48
+ analytics.setUserId(this._delegate, id, options);
49
+ }
50
+ setUserProperties(properties, options) {
51
+ analytics.setUserProperties(this._delegate, properties, options);
52
+ }
53
+ setAnalyticsCollectionEnabled(enabled) {
54
+ analytics.setAnalyticsCollectionEnabled(this._delegate, enabled);
55
+ }
56
+ }
57
+
58
+ /**
59
+ * @license
60
+ * Copyright 2021 Google LLC
61
+ *
62
+ * Licensed under the Apache License, Version 2.0 (the "License");
63
+ * you may not use this file except in compliance with the License.
64
+ * You may obtain a copy of the License at
65
+ *
66
+ * http://www.apache.org/licenses/LICENSE-2.0
67
+ *
68
+ * Unless required by applicable law or agreed to in writing, software
69
+ * distributed under the License is distributed on an "AS IS" BASIS,
70
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71
+ * See the License for the specific language governing permissions and
72
+ * limitations under the License.
73
+ */
74
+ /**
75
+ * Officially recommended event names for gtag.js
76
+ * Any other string is also allowed.
77
+ */
78
+ var EventName;
79
+ (function (EventName) {
80
+ EventName["ADD_SHIPPING_INFO"] = "add_shipping_info";
81
+ EventName["ADD_PAYMENT_INFO"] = "add_payment_info";
82
+ EventName["ADD_TO_CART"] = "add_to_cart";
83
+ EventName["ADD_TO_WISHLIST"] = "add_to_wishlist";
84
+ EventName["BEGIN_CHECKOUT"] = "begin_checkout";
85
+ /**
86
+ * @deprecated
87
+ * This event name is deprecated and is unsupported in updated
88
+ * Enhanced Ecommerce reports.
89
+ */
90
+ EventName["CHECKOUT_PROGRESS"] = "checkout_progress";
91
+ EventName["EXCEPTION"] = "exception";
92
+ EventName["GENERATE_LEAD"] = "generate_lead";
93
+ EventName["LOGIN"] = "login";
94
+ EventName["PAGE_VIEW"] = "page_view";
95
+ EventName["PURCHASE"] = "purchase";
96
+ EventName["REFUND"] = "refund";
97
+ EventName["REMOVE_FROM_CART"] = "remove_from_cart";
98
+ EventName["SCREEN_VIEW"] = "screen_view";
99
+ EventName["SEARCH"] = "search";
100
+ EventName["SELECT_CONTENT"] = "select_content";
101
+ EventName["SELECT_ITEM"] = "select_item";
102
+ EventName["SELECT_PROMOTION"] = "select_promotion";
103
+ /** @deprecated */
104
+ EventName["SET_CHECKOUT_OPTION"] = "set_checkout_option";
105
+ EventName["SHARE"] = "share";
106
+ EventName["SIGN_UP"] = "sign_up";
107
+ EventName["TIMING_COMPLETE"] = "timing_complete";
108
+ EventName["VIEW_CART"] = "view_cart";
109
+ EventName["VIEW_ITEM"] = "view_item";
110
+ EventName["VIEW_ITEM_LIST"] = "view_item_list";
111
+ EventName["VIEW_PROMOTION"] = "view_promotion";
112
+ EventName["VIEW_SEARCH_RESULTS"] = "view_search_results";
113
+ })(EventName || (EventName = {}));
114
+
115
+ /**
116
+ * @license
117
+ * Copyright 2021 Google LLC
118
+ *
119
+ * Licensed under the Apache License, Version 2.0 (the "License");
120
+ * you may not use this file except in compliance with the License.
121
+ * You may obtain a copy of the License at
122
+ *
123
+ * http://www.apache.org/licenses/LICENSE-2.0
124
+ *
125
+ * Unless required by applicable law or agreed to in writing, software
126
+ * distributed under the License is distributed on an "AS IS" BASIS,
127
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128
+ * See the License for the specific language governing permissions and
129
+ * limitations under the License.
130
+ */
131
+ const factory = (container) => {
132
+ // Dependencies
133
+ const app = container.getProvider('app-compat').getImmediate();
134
+ const analyticsServiceExp = container.getProvider('analytics').getImmediate();
135
+ return new AnalyticsService(app, analyticsServiceExp);
136
+ };
137
+ function registerAnalytics() {
138
+ const namespaceExports = {
139
+ Analytics: AnalyticsService,
140
+ settings: analytics.settings,
141
+ isSupported: analytics.isSupported,
142
+ // We removed this enum in exp so need to re-create it here for compat.
143
+ EventName
144
+ };
145
+ firebase__default["default"].INTERNAL.registerComponent(new component.Component('analytics-compat', factory, "PUBLIC" /* ComponentType.PUBLIC */)
146
+ .setServiceProps(namespaceExports)
147
+ .setMultipleInstances(true));
148
+ }
149
+ registerAnalytics();
150
+ firebase__default["default"].registerVersion(name, version);
151
+
152
+ exports.registerAnalytics = registerAnalytics;
153
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/service.ts","../src/constants.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AnalyticsCallOptions,\n CustomParams,\n EventParams,\n FirebaseAnalytics\n} from '@firebase/analytics-types';\nimport {\n Analytics as AnalyticsServiceExp,\n logEvent as logEventExp,\n setAnalyticsCollectionEnabled as setAnalyticsCollectionEnabledExp,\n setCurrentScreen as setCurrentScreenExp,\n setUserId as setUserIdExp,\n setUserProperties as setUserPropertiesExp\n} from '@firebase/analytics';\nimport { _FirebaseService, FirebaseApp } from '@firebase/app-compat';\n\nexport class AnalyticsService implements FirebaseAnalytics, _FirebaseService {\n constructor(\n public app: FirebaseApp,\n readonly _delegate: AnalyticsServiceExp\n ) {}\n\n logEvent(\n eventName: string,\n eventParams?: EventParams | CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n logEventExp(this._delegate, eventName as '', eventParams, options);\n }\n\n /**\n * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\n */\n setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void {\n setCurrentScreenExp(this._delegate, screenName, options);\n }\n\n setUserId(id: string, options?: AnalyticsCallOptions): void {\n setUserIdExp(this._delegate, id, options);\n }\n\n setUserProperties(\n properties: CustomParams,\n options?: AnalyticsCallOptions\n ): void {\n setUserPropertiesExp(this._delegate, properties, options);\n }\n\n setAnalyticsCollectionEnabled(enabled: boolean): void {\n setAnalyticsCollectionEnabledExp(this._delegate, enabled);\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Officially recommended event names for gtag.js\n * Any other string is also allowed.\n */\nexport enum EventName {\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * @deprecated\n * This event name is deprecated and is unsupported in updated\n * Enhanced Ecommerce reports.\n */\n CHECKOUT_PROGRESS = 'checkout_progress',\n EXCEPTION = 'exception',\n GENERATE_LEAD = 'generate_lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n REMOVE_FROM_CART = 'remove_from_cart',\n SCREEN_VIEW = 'screen_view',\n SEARCH = 'search',\n SELECT_CONTENT = 'select_content',\n SELECT_ITEM = 'select_item',\n SELECT_PROMOTION = 'select_promotion',\n /** @deprecated */\n SET_CHECKOUT_OPTION = 'set_checkout_option',\n SHARE = 'share',\n SIGN_UP = 'sign_up',\n TIMING_COMPLETE = 'timing_complete',\n VIEW_CART = 'view_cart',\n VIEW_ITEM = 'view_item',\n VIEW_ITEM_LIST = 'view_item_list',\n VIEW_PROMOTION = 'view_promotion',\n VIEW_SEARCH_RESULTS = 'view_search_results'\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase, {\n _FirebaseNamespace,\n FirebaseApp\n} from '@firebase/app-compat';\nimport { FirebaseAnalytics } from '@firebase/analytics-types';\nimport { name, version } from '../package.json';\nimport { AnalyticsService } from './service';\nimport {\n Component,\n ComponentContainer,\n ComponentType,\n InstanceFactory\n} from '@firebase/component';\nimport {\n settings as settingsExp,\n isSupported as isSupportedExp\n} from '@firebase/analytics';\nimport { EventName } from './constants';\n\nconst factory: InstanceFactory<'analytics-compat'> = (\n container: ComponentContainer\n) => {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const analyticsServiceExp = container.getProvider('analytics').getImmediate();\n\n return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);\n};\n\nexport function registerAnalytics(): void {\n const namespaceExports = {\n Analytics: AnalyticsService,\n settings: settingsExp,\n isSupported: isSupportedExp,\n // We removed this enum in exp so need to re-create it here for compat.\n EventName\n };\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component('analytics-compat', factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n}\n\nregisterAnalytics();\nfirebase.registerVersion(name, version);\n\n/**\n * Define extension behavior of `registerAnalytics`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n analytics(app?: FirebaseApp): FirebaseAnalytics;\n }\n interface FirebaseApp {\n analytics(): FirebaseAnalytics;\n }\n}\n"],"names":["logEventExp","setCurrentScreenExp","setUserIdExp","setUserPropertiesExp","setAnalyticsCollectionEnabledExp","settingsExp","isSupportedExp","firebase","Component"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;MAkBU,gBAAgB,CAAA;IAC3B,WACS,CAAA,GAAgB,EACd,SAA8B,EAAA;QADhC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAa;QACd,IAAS,CAAA,SAAA,GAAT,SAAS,CAAqB;KACrC;AAEJ,IAAA,QAAQ,CACN,SAAiB,EACjB,WAAwC,EACxC,OAA8B,EAAA;QAE9BA,kBAAW,CAAC,IAAI,CAAC,SAAS,EAAE,SAAe,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;KACpE;AAED;;;AAGG;IACH,gBAAgB,CAAC,UAAkB,EAAE,OAA8B,EAAA;QACjEC,0BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC1D;IAED,SAAS,CAAC,EAAU,EAAE,OAA8B,EAAA;QAClDC,mBAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KAC3C;IAED,iBAAiB,CACf,UAAwB,EACxB,OAA8B,EAAA;QAE9BC,2BAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;KAC3D;AAED,IAAA,6BAA6B,CAAC,OAAgB,EAA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SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,iBAAiB,EAAE,CAAC;AACpBD,4BAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 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
+ * Officially recommended event names for gtag.js
19
+ * Any other string is also allowed.
20
+ */
21
+ export declare enum EventName {
22
+ ADD_SHIPPING_INFO = "add_shipping_info",
23
+ ADD_PAYMENT_INFO = "add_payment_info",
24
+ ADD_TO_CART = "add_to_cart",
25
+ ADD_TO_WISHLIST = "add_to_wishlist",
26
+ BEGIN_CHECKOUT = "begin_checkout",
27
+ /**
28
+ * @deprecated
29
+ * This event name is deprecated and is unsupported in updated
30
+ * Enhanced Ecommerce reports.
31
+ */
32
+ CHECKOUT_PROGRESS = "checkout_progress",
33
+ EXCEPTION = "exception",
34
+ GENERATE_LEAD = "generate_lead",
35
+ LOGIN = "login",
36
+ PAGE_VIEW = "page_view",
37
+ PURCHASE = "purchase",
38
+ REFUND = "refund",
39
+ REMOVE_FROM_CART = "remove_from_cart",
40
+ SCREEN_VIEW = "screen_view",
41
+ SEARCH = "search",
42
+ SELECT_CONTENT = "select_content",
43
+ SELECT_ITEM = "select_item",
44
+ SELECT_PROMOTION = "select_promotion",
45
+ /** @deprecated */
46
+ SET_CHECKOUT_OPTION = "set_checkout_option",
47
+ SHARE = "share",
48
+ SIGN_UP = "sign_up",
49
+ TIMING_COMPLETE = "timing_complete",
50
+ VIEW_CART = "view_cart",
51
+ VIEW_ITEM = "view_item",
52
+ VIEW_ITEM_LIST = "view_item_list",
53
+ VIEW_PROMOTION = "view_promotion",
54
+ VIEW_SEARCH_RESULTS = "view_search_results"
55
+ }
@@ -0,0 +1,173 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 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 { FirebaseAnalytics } from '@firebase/analytics-types';
18
+ export declare function registerAnalytics(): void;
19
+ /**
20
+ * Define extension behavior of `registerAnalytics`
21
+ */
22
+ declare module '@firebase/app-compat' {
23
+ interface FirebaseNamespace {
24
+ analytics(app?: FirebaseApp): FirebaseAnalytics;
25
+ }
26
+ interface FirebaseApp {
27
+ analytics(): FirebaseAnalytics;
28
+ }
29
+ }
30
+
31
+ import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
32
+ import { type Analytics, type AnalyticsSettings, type EventParams, type AnalyticsCallOptions, type CustomEventName, type CustomParams } from "@firebase/analytics";
33
+ declare module "@firebase/analytics" {
34
+ function getAnalytics(app?: FirebaseAppCompat): Analytics;
35
+ function getGoogleAnalyticsClientId(analyticsInstance: FirebaseAnalytics): Promise<string>;
36
+ function initializeAnalytics(app: FirebaseAppCompat, options?: AnalyticsSettings): Analytics;
37
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_payment_info', eventParams?: {
38
+ coupon?: EventParams['coupon'];
39
+ currency?: EventParams['currency'];
40
+ items?: EventParams['items'];
41
+ payment_type?: EventParams['payment_type'];
42
+ value?: EventParams['value'];
43
+ [key: string]: any;
44
+ }, options?: AnalyticsCallOptions): void;
45
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_shipping_info', eventParams?: {
46
+ coupon?: EventParams['coupon'];
47
+ currency?: EventParams['currency'];
48
+ items?: EventParams['items'];
49
+ shipping_tier?: EventParams['shipping_tier'];
50
+ value?: EventParams['value'];
51
+ [key: string]: any;
52
+ }, options?: AnalyticsCallOptions): void;
53
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart', eventParams?: {
54
+ currency?: EventParams['currency'];
55
+ value?: EventParams['value'];
56
+ items?: EventParams['items'];
57
+ [key: string]: any;
58
+ }, options?: AnalyticsCallOptions): void;
59
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'begin_checkout', eventParams?: {
60
+ currency?: EventParams['currency'];
61
+ coupon?: EventParams['coupon'];
62
+ value?: EventParams['value'];
63
+ items?: EventParams['items'];
64
+ [key: string]: any;
65
+ }, options?: AnalyticsCallOptions): void;
66
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'checkout_progress', eventParams?: {
67
+ currency?: EventParams['currency'];
68
+ coupon?: EventParams['coupon'];
69
+ value?: EventParams['value'];
70
+ items?: EventParams['items'];
71
+ checkout_step?: EventParams['checkout_step'];
72
+ checkout_option?: EventParams['checkout_option'];
73
+ [key: string]: any;
74
+ }, options?: AnalyticsCallOptions): void;
75
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'exception', eventParams?: {
76
+ description?: EventParams['description'];
77
+ fatal?: EventParams['fatal'];
78
+ [key: string]: any;
79
+ }, options?: AnalyticsCallOptions): void;
80
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'generate_lead', eventParams?: {
81
+ value?: EventParams['value'];
82
+ currency?: EventParams['currency'];
83
+ [key: string]: any;
84
+ }, options?: AnalyticsCallOptions): void;
85
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'login', eventParams?: {
86
+ method?: EventParams['method'];
87
+ [key: string]: any;
88
+ }, options?: AnalyticsCallOptions): void;
89
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'page_view', eventParams?: {
90
+ page_title?: string;
91
+ page_location?: string;
92
+ page_path?: string;
93
+ [key: string]: any;
94
+ }, options?: AnalyticsCallOptions): void;
95
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'purchase' | 'refund', eventParams?: {
96
+ value?: EventParams['value'];
97
+ currency?: EventParams['currency'];
98
+ transaction_id: EventParams['transaction_id'];
99
+ tax?: EventParams['tax'];
100
+ shipping?: EventParams['shipping'];
101
+ items?: EventParams['items'];
102
+ coupon?: EventParams['coupon'];
103
+ affiliation?: EventParams['affiliation'];
104
+ [key: string]: any;
105
+ }, options?: AnalyticsCallOptions): void;
106
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'screen_view', eventParams?: {
107
+ firebase_screen: EventParams['firebase_screen'];
108
+ firebase_screen_class: EventParams['firebase_screen_class'];
109
+ [key: string]: any;
110
+ }, options?: AnalyticsCallOptions): void;
111
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'search' | 'view_search_results', eventParams?: {
112
+ search_term?: EventParams['search_term'];
113
+ [key: string]: any;
114
+ }, options?: AnalyticsCallOptions): void;
115
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_content', eventParams?: {
116
+ content_type?: EventParams['content_type'];
117
+ item_id?: EventParams['item_id'];
118
+ [key: string]: any;
119
+ }, options?: AnalyticsCallOptions): void;
120
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_item', eventParams?: {
121
+ items?: EventParams['items'];
122
+ item_list_name?: EventParams['item_list_name'];
123
+ item_list_id?: EventParams['item_list_id'];
124
+ [key: string]: any;
125
+ }, options?: AnalyticsCallOptions): void;
126
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'select_promotion' | 'view_promotion', eventParams?: {
127
+ items?: EventParams['items'];
128
+ promotion_id?: EventParams['promotion_id'];
129
+ promotion_name?: EventParams['promotion_name'];
130
+ [key: string]: any;
131
+ }, options?: AnalyticsCallOptions): void;
132
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'set_checkout_option', eventParams?: {
133
+ checkout_step?: EventParams['checkout_step'];
134
+ checkout_option?: EventParams['checkout_option'];
135
+ [key: string]: any;
136
+ }, options?: AnalyticsCallOptions): void;
137
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'share', eventParams?: {
138
+ method?: EventParams['method'];
139
+ content_type?: EventParams['content_type'];
140
+ item_id?: EventParams['item_id'];
141
+ [key: string]: any;
142
+ }, options?: AnalyticsCallOptions): void;
143
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'sign_up', eventParams?: {
144
+ method?: EventParams['method'];
145
+ [key: string]: any;
146
+ }, options?: AnalyticsCallOptions): void;
147
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'timing_complete', eventParams?: {
148
+ name: string;
149
+ value: number;
150
+ event_category?: string;
151
+ event_label?: string;
152
+ [key: string]: any;
153
+ }, options?: AnalyticsCallOptions): void;
154
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_cart' | 'view_item', eventParams?: {
155
+ currency?: EventParams['currency'];
156
+ items?: EventParams['items'];
157
+ value?: EventParams['value'];
158
+ [key: string]: any;
159
+ }, options?: AnalyticsCallOptions): void;
160
+ function logEvent(analyticsInstance: FirebaseAnalytics, eventName: 'view_item_list', eventParams?: {
161
+ items?: EventParams['items'];
162
+ item_list_name?: EventParams['item_list_name'];
163
+ item_list_id?: EventParams['item_list_id'];
164
+ [key: string]: any;
165
+ }, options?: AnalyticsCallOptions): void;
166
+ function logEvent<T extends string>(analyticsInstance: FirebaseAnalytics, eventName: CustomEventName<T>, eventParams?: {
167
+ [key: string]: any;
168
+ }, options?: AnalyticsCallOptions): void;
169
+ function setAnalyticsCollectionEnabled(analyticsInstance: FirebaseAnalytics, enabled: boolean): void;
170
+ function setCurrentScreen(analyticsInstance: FirebaseAnalytics, screenName: string, options?: AnalyticsCallOptions): void;
171
+ function setUserId(analyticsInstance: FirebaseAnalytics, id: string | null, options?: AnalyticsCallOptions): void;
172
+ function setUserProperties(analyticsInstance: FirebaseAnalytics, properties: CustomParams, options?: AnalyticsCallOptions): void;
173
+ }
@@ -0,0 +1,33 @@
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 { AnalyticsCallOptions, CustomParams, EventParams, FirebaseAnalytics } from '@firebase/analytics-types';
18
+ import { Analytics as AnalyticsServiceExp } from '@firebase/analytics';
19
+ import { _FirebaseService, FirebaseApp } from '@firebase/app-compat';
20
+ export declare class AnalyticsService implements FirebaseAnalytics, _FirebaseService {
21
+ app: FirebaseApp;
22
+ readonly _delegate: AnalyticsServiceExp;
23
+ constructor(app: FirebaseApp, _delegate: AnalyticsServiceExp);
24
+ logEvent(eventName: string, eventParams?: EventParams | CustomParams, options?: AnalyticsCallOptions): void;
25
+ /**
26
+ * @deprecated Use {@link logEvent} with `eventName` as 'screen_view' and add relevant `eventParams`.
27
+ * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.
28
+ */
29
+ setCurrentScreen(screenName: string, options?: AnalyticsCallOptions): void;
30
+ setUserId(id: string, options?: AnalyticsCallOptions): void;
31
+ setUserProperties(properties: CustomParams, options?: AnalyticsCallOptions): void;
32
+ setAnalyticsCollectionEnabled(enabled: boolean): void;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@depup/firebase__analytics-compat",
3
+ "version": "0.2.26-depup.0",
4
+ "description": "[DepUp] Dependency-bumped version of @firebase/analytics-compat",
5
+ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
+ "main": "dist/index.cjs.js",
7
+ "browser": "dist/esm/index.esm.js",
8
+ "module": "dist/esm/index.esm.js",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "require": "./dist/index.cjs.js",
13
+ "default": "./dist/esm/index.esm.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "changes.json",
20
+ "README.md"
21
+ ],
22
+ "license": "Apache-2.0",
23
+ "peerDependencies": {
24
+ "@firebase/app-compat": "0.x"
25
+ },
26
+ "devDependencies": {
27
+ "@firebase/app-compat": "0.5.9",
28
+ "rollup": "2.79.2",
29
+ "@rollup/plugin-json": "6.1.0",
30
+ "rollup-plugin-typescript2": "0.36.0",
31
+ "typescript": "5.5.4"
32
+ },
33
+ "repository": {
34
+ "directory": "packages/analytics-compat",
35
+ "type": "git",
36
+ "url": "git+https://github.com/firebase/firebase-js-sdk.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/firebase/firebase-js-sdk/issues"
40
+ },
41
+ "scripts": {
42
+ "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
43
+ "lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
44
+ "build": "rollup -c",
45
+ "build:deps": "lerna run --scope @firebase/analytics-compat --include-dependencies build",
46
+ "build:release": "yarn build && yarn add-compat-overloads",
47
+ "dev": "rollup -c -w",
48
+ "test": "run-p --npm-path npm lint test:browser",
49
+ "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:browser",
50
+ "test:browser": "karma start",
51
+ "test:browser:debug": "karma start --browsers=Chrome --auto-watch",
52
+ "trusted-type-check": "tsec -p tsconfig.json --noEmit",
53
+ "add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../analytics/dist/analytics-public.d.ts -o dist/src/index.d.ts -a -r Analytics:FirebaseAnalytics -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/analytics"
54
+ },
55
+ "typings": "dist/src/index.d.ts",
56
+ "dependencies": {
57
+ "@firebase/component": "0.7.1",
58
+ "@firebase/analytics": "0.10.20",
59
+ "@firebase/analytics-types": "0.8.3",
60
+ "@firebase/util": "1.14.0",
61
+ "tslib": "^2.8.1"
62
+ },
63
+ "nyc": {
64
+ "extension": [
65
+ ".ts"
66
+ ],
67
+ "reportDir": "./coverage/node"
68
+ },
69
+ "keywords": [
70
+ "depup",
71
+ "dependency-bumped",
72
+ "updated-deps",
73
+ "@firebase/analytics-compat"
74
+ ],
75
+ "depup": {
76
+ "changes": {
77
+ "tslib": {
78
+ "from": "^2.1.0",
79
+ "to": "^2.8.1"
80
+ }
81
+ },
82
+ "depsUpdated": 1,
83
+ "originalPackage": "@firebase/analytics-compat",
84
+ "originalVersion": "0.2.26",
85
+ "processedAt": "2026-03-17T16:31:22.902Z",
86
+ "smokeTest": "failed"
87
+ }
88
+ }