@firebase/analytics-compat 0.2.15 → 0.2.16-canary.ffbf5a60a
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 +131 -131
- package/dist/esm/src/constants.d.ts +55 -55
- package/dist/esm/src/index.d.ts +29 -29
- package/dist/esm/src/service.d.ts +33 -33
- package/dist/esm/src/service.test.d.ts +1 -1
- package/dist/index.cjs.js +131 -131
- package/dist/src/constants.d.ts +55 -55
- package/dist/src/index.d.ts +29 -29
- package/dist/src/service.d.ts +33 -33
- package/dist/src/service.test.d.ts +1 -1
- package/package.json +8 -8
|
@@ -3,142 +3,142 @@ import { logEvent, setCurrentScreen, setUserId, setUserProperties, setAnalyticsC
|
|
|
3
3
|
import { Component } from '@firebase/component';
|
|
4
4
|
|
|
5
5
|
const name = "@firebase/analytics-compat";
|
|
6
|
-
const version = "0.2.
|
|
6
|
+
const version = "0.2.16-canary.ffbf5a60a";
|
|
7
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
|
-
}
|
|
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
48
|
}
|
|
49
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";
|
|
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
105
|
})(EventName || (EventName = {}));
|
|
106
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();
|
|
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
142
|
firebase.registerVersion(name, version);
|
|
143
143
|
|
|
144
144
|
export { registerAnalytics };
|
|
@@ -1,55 +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
|
-
}
|
|
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
|
+
}
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,29 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,33 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/index.cjs.js
CHANGED
|
@@ -11,142 +11,142 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
12
12
|
|
|
13
13
|
const name = "@firebase/analytics-compat";
|
|
14
|
-
const version = "0.2.
|
|
14
|
+
const version = "0.2.16-canary.ffbf5a60a";
|
|
15
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
|
-
}
|
|
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
56
|
}
|
|
57
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";
|
|
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
113
|
})(EventName || (EventName = {}));
|
|
114
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();
|
|
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
150
|
firebase__default["default"].registerVersion(name, version);
|
|
151
151
|
|
|
152
152
|
exports.registerAnalytics = registerAnalytics;
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -1,55 +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
|
-
}
|
|
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
|
+
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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
|
-
}
|
|
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
30
|
|
|
31
31
|
import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
|
|
32
32
|
import { type Analytics, type AnalyticsSettings, type EventParams, type AnalyticsCallOptions, type CustomEventName, type CustomParams } from "@firebase/analytics";
|
package/dist/src/service.d.ts
CHANGED
|
@@ -1,33 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/analytics-compat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16-canary.ffbf5a60a",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
],
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@firebase/app-compat": "0.
|
|
22
|
+
"@firebase/app-compat": "0.2.46-canary.ffbf5a60a"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@firebase/app-compat": "0.2.
|
|
25
|
+
"@firebase/app-compat": "0.2.46-canary.ffbf5a60a",
|
|
26
26
|
"rollup": "2.79.1",
|
|
27
27
|
"@rollup/plugin-json": "4.1.0",
|
|
28
28
|
"rollup-plugin-typescript2": "0.31.2",
|
|
29
|
-
"typescript": "
|
|
29
|
+
"typescript": "5.5.4"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"directory": "packages/analytics-compat",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
},
|
|
53
53
|
"typings": "dist/src/index.d.ts",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@firebase/component": "0.6.
|
|
56
|
-
"@firebase/analytics": "0.10.
|
|
57
|
-
"@firebase/analytics-types": "0.8.
|
|
58
|
-
"@firebase/util": "1.10.
|
|
55
|
+
"@firebase/component": "0.6.11-canary.ffbf5a60a",
|
|
56
|
+
"@firebase/analytics": "0.10.10-canary.ffbf5a60a",
|
|
57
|
+
"@firebase/analytics-types": "0.8.3-canary.ffbf5a60a",
|
|
58
|
+
"@firebase/util": "1.10.2-canary.ffbf5a60a",
|
|
59
59
|
"tslib": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"nyc": {
|