@react-native-firebase/analytics 23.6.0 → 23.8.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.
Files changed (132) hide show
  1. package/dist/commonjs/index.js +38 -0
  2. package/dist/commonjs/index.js.map +1 -0
  3. package/dist/commonjs/modular.js +613 -0
  4. package/dist/commonjs/modular.js.map +1 -0
  5. package/dist/commonjs/namespaced.js +441 -0
  6. package/dist/commonjs/namespaced.js.map +1 -0
  7. package/dist/commonjs/package.json +1 -0
  8. package/dist/commonjs/struct.js +54 -0
  9. package/dist/commonjs/struct.js.map +1 -0
  10. package/dist/commonjs/structs.js +214 -0
  11. package/dist/commonjs/structs.js.map +1 -0
  12. package/dist/commonjs/types/analytics.js +79 -0
  13. package/dist/commonjs/types/analytics.js.map +1 -0
  14. package/dist/commonjs/types/web.js +2 -0
  15. package/dist/commonjs/types/web.js.map +1 -0
  16. package/dist/commonjs/version.js +9 -0
  17. package/dist/commonjs/version.js.map +1 -0
  18. package/dist/commonjs/web/RNFBAnalyticsModule.android.js +9 -0
  19. package/dist/commonjs/web/RNFBAnalyticsModule.android.js.map +1 -0
  20. package/dist/commonjs/web/RNFBAnalyticsModule.ios.js +9 -0
  21. package/dist/commonjs/web/RNFBAnalyticsModule.ios.js.map +1 -0
  22. package/dist/commonjs/web/RNFBAnalyticsModule.js +119 -0
  23. package/dist/commonjs/web/RNFBAnalyticsModule.js.map +1 -0
  24. package/dist/commonjs/web/api.js +294 -0
  25. package/dist/commonjs/web/api.js.map +1 -0
  26. package/{ios/RNFBAnalytics/RNFBAnalyticsModule.h → dist/module/index.js} +10 -6
  27. package/dist/module/index.js.map +1 -0
  28. package/{lib/modular/index.js → dist/module/modular.js} +43 -161
  29. package/dist/module/modular.js.map +1 -0
  30. package/dist/module/namespaced.js +438 -0
  31. package/dist/module/namespaced.js.map +1 -0
  32. package/dist/module/package.json +1 -0
  33. package/{lib → dist/module}/struct.js +12 -14
  34. package/dist/module/struct.js.map +1 -0
  35. package/dist/module/structs.js +210 -0
  36. package/dist/module/structs.js.map +1 -0
  37. package/dist/module/types/analytics.js +75 -0
  38. package/dist/module/types/analytics.js.map +1 -0
  39. package/dist/module/types/web.js +2 -0
  40. package/dist/module/types/web.js.map +1 -0
  41. package/dist/module/version.js +5 -0
  42. package/dist/module/version.js.map +1 -0
  43. package/dist/module/web/RNFBAnalyticsModule.android.js +6 -0
  44. package/dist/module/web/RNFBAnalyticsModule.android.js.map +1 -0
  45. package/dist/module/web/RNFBAnalyticsModule.ios.js +6 -0
  46. package/dist/module/web/RNFBAnalyticsModule.ios.js.map +1 -0
  47. package/{lib → dist/module}/web/RNFBAnalyticsModule.js +17 -21
  48. package/dist/module/web/RNFBAnalyticsModule.js.map +1 -0
  49. package/{lib → dist/module}/web/api.js +34 -77
  50. package/dist/module/web/api.js.map +1 -0
  51. package/dist/typescript/commonjs/lib/index.d.ts +5 -0
  52. package/dist/typescript/commonjs/lib/index.d.ts.map +1 -0
  53. package/dist/typescript/commonjs/lib/modular.d.ts +476 -0
  54. package/dist/typescript/commonjs/lib/modular.d.ts.map +1 -0
  55. package/dist/typescript/commonjs/lib/namespaced.d.ts +12 -0
  56. package/dist/typescript/commonjs/lib/namespaced.d.ts.map +1 -0
  57. package/dist/typescript/commonjs/lib/struct.d.ts +3 -0
  58. package/dist/typescript/commonjs/lib/struct.d.ts.map +1 -0
  59. package/dist/typescript/commonjs/lib/structs.d.ts +1155 -0
  60. package/dist/typescript/commonjs/lib/structs.d.ts.map +1 -0
  61. package/dist/typescript/commonjs/lib/types/analytics.d.ts +944 -0
  62. package/dist/typescript/commonjs/lib/types/analytics.d.ts.map +1 -0
  63. package/dist/typescript/commonjs/lib/types/web.d.ts +36 -0
  64. package/dist/typescript/commonjs/lib/types/web.d.ts.map +1 -0
  65. package/dist/typescript/commonjs/lib/version.d.ts +2 -0
  66. package/dist/typescript/commonjs/lib/version.d.ts.map +1 -0
  67. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.android.d.ts +3 -0
  68. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.android.d.ts.map +1 -0
  69. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.d.ts +9 -0
  70. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.d.ts.map +1 -0
  71. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.ios.d.ts +3 -0
  72. package/dist/typescript/commonjs/lib/web/RNFBAnalyticsModule.ios.d.ts.map +1 -0
  73. package/dist/typescript/commonjs/lib/web/api.d.ts +37 -0
  74. package/dist/typescript/commonjs/lib/web/api.d.ts.map +1 -0
  75. package/dist/typescript/commonjs/package.json +1 -0
  76. package/dist/typescript/module/lib/index.d.ts +5 -0
  77. package/dist/typescript/module/lib/index.d.ts.map +1 -0
  78. package/dist/typescript/module/lib/modular.d.ts +476 -0
  79. package/dist/typescript/module/lib/modular.d.ts.map +1 -0
  80. package/dist/typescript/module/lib/namespaced.d.ts +12 -0
  81. package/dist/typescript/module/lib/namespaced.d.ts.map +1 -0
  82. package/dist/typescript/module/lib/struct.d.ts +3 -0
  83. package/dist/typescript/module/lib/struct.d.ts.map +1 -0
  84. package/dist/typescript/module/lib/structs.d.ts +1155 -0
  85. package/dist/typescript/module/lib/structs.d.ts.map +1 -0
  86. package/dist/typescript/module/lib/types/analytics.d.ts +944 -0
  87. package/dist/typescript/module/lib/types/analytics.d.ts.map +1 -0
  88. package/dist/typescript/module/lib/types/web.d.ts +36 -0
  89. package/dist/typescript/module/lib/types/web.d.ts.map +1 -0
  90. package/dist/typescript/module/lib/version.d.ts +2 -0
  91. package/dist/typescript/module/lib/version.d.ts.map +1 -0
  92. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.android.d.ts +3 -0
  93. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.android.d.ts.map +1 -0
  94. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.d.ts +9 -0
  95. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.d.ts.map +1 -0
  96. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.ios.d.ts +3 -0
  97. package/dist/typescript/module/lib/web/RNFBAnalyticsModule.ios.d.ts.map +1 -0
  98. package/dist/typescript/module/lib/web/api.d.ts +37 -0
  99. package/dist/typescript/module/lib/web/api.d.ts.map +1 -0
  100. package/dist/typescript/module/package.json +1 -0
  101. package/lib/index.ts +73 -0
  102. package/lib/modular.ts +1026 -0
  103. package/lib/{index.js → namespaced.ts} +145 -72
  104. package/lib/struct.ts +61 -0
  105. package/lib/{structs.js → structs.ts} +3 -3
  106. package/lib/types/analytics.ts +1078 -0
  107. package/lib/types/web.ts +56 -0
  108. package/lib/version.ts +2 -0
  109. package/lib/web/RNFBAnalyticsModule.android.ts +3 -0
  110. package/lib/web/RNFBAnalyticsModule.ios.ts +3 -0
  111. package/lib/web/RNFBAnalyticsModule.ts +135 -0
  112. package/lib/web/api.ts +366 -0
  113. package/package.json +61 -7
  114. package/CHANGELOG.md +0 -1081
  115. package/RNFBAnalytics.podspec +0 -71
  116. package/android/.editorconfig +0 -10
  117. package/android/build.gradle +0 -177
  118. package/android/lint.xml +0 -5
  119. package/android/settings.gradle +0 -1
  120. package/android/src/main/AndroidManifest.xml +0 -21
  121. package/android/src/main/java/io/invertase/firebase/analytics/UniversalFirebaseAnalyticsModule.java +0 -141
  122. package/android/src/reactnative/AndroidManifest.xml +0 -2
  123. package/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java +0 -213
  124. package/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsPackage.java +0 -41
  125. package/ios/RNFBAnalytics/RNFBAnalyticsModule.m +0 -268
  126. package/ios/RNFBAnalytics.xcodeproj/project.pbxproj +0 -349
  127. package/ios/RNFBAnalytics.xcodeproj/xcshareddata/IDETemplateMacros.plist +0 -24
  128. package/lib/index.d.ts +0 -1903
  129. package/lib/modular/index.d.ts +0 -1267
  130. package/lib/version.js +0 -2
  131. package/lib/web/RNFBAnalyticsModule.android.js +0 -2
  132. package/lib/web/RNFBAnalyticsModule.ios.js +0 -2
@@ -1,1267 +0,0 @@
1
- import { ReactNativeFirebase } from '@react-native-firebase/app';
2
- import { FirebaseAnalyticsTypes } from '..';
3
- import Analytics = FirebaseAnalyticsTypes.Module;
4
- import AnalyticsCallOptions = FirebaseAnalyticsTypes.AnalyticsCallOptions;
5
- import EventParams = FirebaseAnalyticsTypes.EventParams;
6
- import FirebaseApp = ReactNativeFirebase.FirebaseApp;
7
-
8
- /**
9
- * Returns an Analytics instance for the given app.
10
- *
11
- * @param app - FirebaseApp. Optional.
12
- */
13
- export declare function getAnalytics(app?: FirebaseApp): Analytics;
14
-
15
- /**
16
- * Returns an Analytics instance for the given app.
17
- *
18
- * @param app - FirebaseApp.
19
- * @param options - `AnalyticsSettings`. Web only.
20
- */
21
- export declare function initializeAnalytics(
22
- app: FirebaseApp,
23
- options?: FirebaseAnalyticsTypes.AnalyticsSettings,
24
- ): Analytics;
25
-
26
- /**
27
- * Retrieves a unique Google Analytics identifier for the web client.
28
- *
29
- * @param analyticsInstance - Instance of analytics (web - only)
30
- *
31
- */
32
- export declare function getGoogleAnalyticsClientId(analyticsInstance: Analytics): Promise<string>;
33
-
34
- /**
35
- * Log a custom event with optional params. Note that there are various limits that applied
36
- * to event parameters (total parameter count, etc), but analytics applies the limits during
37
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
38
- * While integrating this API in your app you are strongly encouraged to enable
39
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
40
- * any errors in your events will show up in the firebase web console with links to relevant documentation
41
- *
42
- * @param analytics Analytics instance.
43
- * @param name Event name must not conflict with any Reserved Events.
44
- * @param params Parameters to be sent and displayed with the event.
45
- * @param options Additional options that can be passed. Web only.
46
- */
47
- export declare function logEvent(
48
- analytics: Analytics,
49
- name: 'add_payment_info',
50
- params?: {
51
- coupon?: EventParams['coupon'];
52
- currency?: EventParams['currency'];
53
- items?: EventParams['items'];
54
- payment_type?: EventParams['payment_type'];
55
- value?: EventParams['value'];
56
- [key: string]: any;
57
- },
58
- options?: AnalyticsCallOptions,
59
- ): Promise<void>;
60
-
61
- /**
62
- * Log a custom event with optional params. Note that there are various limits that applied
63
- * to event parameters (total parameter count, etc), but analytics applies the limits during
64
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
65
- * While integrating this API in your app you are strongly encouraged to enable
66
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
67
- * any errors in your events will show up in the firebase web console with links to relevant documentation
68
- *
69
- * @param analytics Analytics instance.
70
- * @param name Event name must not conflict with any Reserved Events.
71
- * @param params Parameters to be sent and displayed with the event.
72
- * @param options Additional options that can be passed. Web only.
73
- */
74
- export declare function logEvent(
75
- analytics: Analytics,
76
- name: 'purchase' | 'refund',
77
- params?: {
78
- value?: EventParams['value'];
79
- currency?: EventParams['currency'];
80
- transaction_id: EventParams['transaction_id'];
81
- tax?: EventParams['tax'];
82
- shipping?: EventParams['shipping'];
83
- items?: EventParams['items'];
84
- coupon?: EventParams['coupon'];
85
- affiliation?: EventParams['affiliation'];
86
- [key: string]: any;
87
- },
88
- options?: AnalyticsCallOptions,
89
- ): Promise<void>;
90
-
91
- /**
92
- * Log a custom event with optional params. Note that there are various limits that applied
93
- * to event parameters (total parameter count, etc), but analytics applies the limits during
94
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
95
- * While integrating this API in your app you are strongly encouraged to enable
96
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
97
- * any errors in your events will show up in the firebase web console with links to relevant documentation
98
- *
99
- * @param analytics Analytics instance.
100
- * @param name Event name must not conflict with any Reserved Events.
101
- * @param params Parameters to be sent and displayed with the event.
102
- * @param options Additional options that can be passed. Web only.
103
- */
104
- export declare function logEvent(
105
- analytics: Analytics,
106
- name: 'screen_view',
107
- params?: {
108
- firebase_screen: EventParams['firebase_screen'];
109
- firebase_screen_class: EventParams['firebase_screen_class'];
110
- [key: string]: any;
111
- },
112
- options?: AnalyticsCallOptions,
113
- ): Promise<void>;
114
-
115
- /**
116
- * Log a custom event with optional params. Note that there are various limits that applied
117
- * to event parameters (total parameter count, etc), but analytics applies the limits during
118
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
119
- * While integrating this API in your app you are strongly encouraged to enable
120
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
121
- * any errors in your events will show up in the firebase web console with links to relevant documentation
122
- *
123
- * @param analytics Analytics instance.
124
- * @param name Event name must not conflict with any Reserved Events.
125
- * @param params Parameters to be sent and displayed with the event.
126
- * @param options Additional options that can be passed. Web only.
127
- */
128
- export declare function logEvent(
129
- analytics: Analytics,
130
- name: 'search' | 'view_search_results',
131
- params?: {
132
- search_term?: EventParams['search_term'];
133
- [key: string]: any;
134
- },
135
- options?: AnalyticsCallOptions,
136
- ): Promise<void>;
137
-
138
- /**
139
- * Log a custom event with optional params. Note that there are various limits that applied
140
- * to event parameters (total parameter count, etc), but analytics applies the limits during
141
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
142
- * While integrating this API in your app you are strongly encouraged to enable
143
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
144
- * any errors in your events will show up in the firebase web console with links to relevant documentation
145
- *
146
- * @param analytics Analytics instance.
147
- * @param name Event name must not conflict with any Reserved Events.
148
- * @param params Parameters to be sent and displayed with the event.
149
- * @param options Additional options that can be passed. Web only.
150
- */
151
- export declare function logEvent(
152
- analytics: Analytics,
153
- name: 'select_content',
154
- params?: {
155
- content_type?: EventParams['content_type'];
156
- item_id?: EventParams['item_id'];
157
- [key: string]: any;
158
- },
159
- options?: AnalyticsCallOptions,
160
- ): Promise<void>;
161
-
162
- /**
163
- * Log a custom event with optional params. Note that there are various limits that applied
164
- * to event parameters (total parameter count, etc), but analytics applies the limits during
165
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
166
- * While integrating this API in your app you are strongly encouraged to enable
167
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
168
- * any errors in your events will show up in the firebase web console with links to relevant documentation
169
- *
170
- * @param analytics Analytics instance.
171
- * @param name Event name must not conflict with any Reserved Events.
172
- * @param params Parameters to be sent and displayed with the event.
173
- * @param options Additional options that can be passed. Web only.
174
- */
175
- export declare function logEvent(
176
- analytics: Analytics,
177
- name: 'select_item',
178
- params?: {
179
- items?: EventParams['items'];
180
- item_list_name?: EventParams['item_list_name'];
181
- item_list_id?: EventParams['item_list_id'];
182
- [key: string]: any;
183
- },
184
- options?: AnalyticsCallOptions,
185
- ): Promise<void>;
186
-
187
- /**
188
- * Log a custom event with optional params. Note that there are various limits that applied
189
- * to event parameters (total parameter count, etc), but analytics applies the limits during
190
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
191
- * While integrating this API in your app you are strongly encouraged to enable
192
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
193
- * any errors in your events will show up in the firebase web console with links to relevant documentation
194
- *
195
- * @param analytics Analytics instance.
196
- * @param name Event name must not conflict with any Reserved Events.
197
- * @param params Parameters to be sent and displayed with the event.
198
- * @param options Additional options that can be passed. Web only.
199
- */
200
- export declare function logEvent(
201
- analytics: Analytics,
202
- name: 'select_promotion' | 'view_promotion',
203
- params?: {
204
- items?: EventParams['items'];
205
- promotion_id?: EventParams['promotion_id'];
206
- promotion_name?: EventParams['promotion_name'];
207
- [key: string]: any;
208
- },
209
- options?: AnalyticsCallOptions,
210
- ): Promise<void>;
211
-
212
- /**
213
- * Log a custom event with optional params. Note that there are various limits that applied
214
- * to event parameters (total parameter count, etc), but analytics applies the limits during
215
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
216
- * While integrating this API in your app you are strongly encouraged to enable
217
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
218
- * any errors in your events will show up in the firebase web console with links to relevant documentation
219
- *
220
- * @param analytics Analytics instance.
221
- * @param name Event name must not conflict with any Reserved Events.
222
- * @param params Parameters to be sent and displayed with the event.
223
- * @param options Additional options that can be passed. Web only.
224
- */
225
- export declare function logEvent(
226
- analytics: Analytics,
227
- name: 'set_checkout_option',
228
- params?: {
229
- checkout_step?: EventParams['checkout_step'];
230
- checkout_option?: EventParams['checkout_option'];
231
- [key: string]: any;
232
- },
233
- options?: AnalyticsCallOptions,
234
- ): Promise<void>;
235
-
236
- /**
237
- * Log a custom event with optional params. Note that there are various limits that applied
238
- * to event parameters (total parameter count, etc), but analytics applies the limits during
239
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
240
- * While integrating this API in your app you are strongly encouraged to enable
241
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
242
- * any errors in your events will show up in the firebase web console with links to relevant documentation
243
- *
244
- * @param analytics Analytics instance.
245
- * @param name Event name must not conflict with any Reserved Events.
246
- * @param params Parameters to be sent and displayed with the event.
247
- * @param options Additional options that can be passed. Web only.
248
- */
249
- export declare function logEvent(
250
- analytics: Analytics,
251
- name: 'share',
252
- params?: {
253
- method?: EventParams['method'];
254
- content_type?: EventParams['content_type'];
255
- item_id?: EventParams['item_id'];
256
- [key: string]: any;
257
- },
258
- options?: AnalyticsCallOptions,
259
- ): Promise<void>;
260
-
261
- /**
262
- * Log a custom event with optional params. Note that there are various limits that applied
263
- * to event parameters (total parameter count, etc), but analytics applies the limits during
264
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
265
- * While integrating this API in your app you are strongly encouraged to enable
266
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
267
- * any errors in your events will show up in the firebase web console with links to relevant documentation
268
- *
269
- * @param analytics Analytics instance.
270
- * @param name Event name must not conflict with any Reserved Events.
271
- * @param params Parameters to be sent and displayed with the event.
272
- * @param options Additional options that can be passed. Web only.
273
- */
274
- export declare function logEvent(
275
- analytics: Analytics,
276
- name: 'sign_up',
277
- params?: {
278
- method?: EventParams['method'];
279
- [key: string]: any;
280
- },
281
- options?: AnalyticsCallOptions,
282
- ): Promise<void>;
283
-
284
- /**
285
- * Log a custom event with optional params. Note that there are various limits that applied
286
- * to event parameters (total parameter count, etc), but analytics applies the limits during
287
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
288
- * While integrating this API in your app you are strongly encouraged to enable
289
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
290
- * any errors in your events will show up in the firebase web console with links to relevant documentation
291
- *
292
- * @param analytics Analytics instance.
293
- * @param name Event name must not conflict with any Reserved Events.
294
- * @param params Parameters to be sent and displayed with the event.
295
- * @param options Additional options that can be passed. Web only.
296
- */
297
- export declare function logEvent(
298
- analytics: Analytics,
299
- name: 'timing_complete',
300
- params?: {
301
- name: string;
302
- value: number;
303
- event_category?: string;
304
- event_label?: string;
305
- [key: string]: any;
306
- },
307
- options?: AnalyticsCallOptions,
308
- ): Promise<void>;
309
-
310
- /**
311
- * Log a custom event with optional params. Note that there are various limits that applied
312
- * to event parameters (total parameter count, etc), but analytics applies the limits during
313
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
314
- * While integrating this API in your app you are strongly encouraged to enable
315
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
316
- * any errors in your events will show up in the firebase web console with links to relevant documentation
317
- *
318
- * @param analytics Analytics instance.
319
- * @param name Event name must not conflict with any Reserved Events.
320
- * @param params Parameters to be sent and displayed with the event.
321
- * @param options Additional options that can be passed. Web only.
322
- */
323
- export declare function logEvent(
324
- analytics: Analytics,
325
- name: 'add_shipping_info',
326
- params?: {
327
- coupon?: EventParams['coupon'];
328
- currency?: EventParams['currency'];
329
- items?: EventParams['items'];
330
- shipping_tier?: EventParams['shipping_tier'];
331
- value?: EventParams['value'];
332
- [key: string]: any;
333
- },
334
- options?: AnalyticsCallOptions,
335
- ): Promise<void>;
336
-
337
- /**
338
- * Log a custom event with optional params. Note that there are various limits that applied
339
- * to event parameters (total parameter count, etc), but analytics applies the limits during
340
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
341
- * While integrating this API in your app you are strongly encouraged to enable
342
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
343
- * any errors in your events will show up in the firebase web console with links to relevant documentation
344
- *
345
- * @param analytics Analytics instance.
346
- * @param name Event name must not conflict with any Reserved Events.
347
- * @param params Parameters to be sent and displayed with the event.
348
- * @param options Additional options that can be passed. Web only.
349
- */
350
- export declare function logEvent(
351
- analytics: Analytics,
352
- name: 'view_cart' | 'view_item',
353
- params?: {
354
- currency?: EventParams['currency'];
355
- items?: EventParams['items'];
356
- value?: EventParams['value'];
357
- [key: string]: any;
358
- },
359
- options?: AnalyticsCallOptions,
360
- ): Promise<void>;
361
-
362
- /**
363
- * Log a custom event with optional params. Note that there are various limits that applied
364
- * to event parameters (total parameter count, etc), but analytics applies the limits during
365
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
366
- * While integrating this API in your app you are strongly encouraged to enable
367
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
368
- * any errors in your events will show up in the firebase web console with links to relevant documentation
369
- *
370
- * @param analytics Analytics instance.
371
- * @param name Event name must not conflict with any Reserved Events.
372
- * @param params Parameters to be sent and displayed with the event.
373
- * @param options Additional options that can be passed. Web only.
374
- */
375
- export declare function logEvent(
376
- analytics: Analytics,
377
- name: 'view_item_list',
378
- params?: {
379
- items?: EventParams['items'];
380
- item_list_name?: EventParams['item_list_name'];
381
- item_list_id?: EventParams['item_list_id'];
382
- [key: string]: any;
383
- },
384
- options?: AnalyticsCallOptions,
385
- ): Promise<void>;
386
-
387
- /**
388
- * Log a custom event with optional params. Note that there are various limits that applied
389
- * to event parameters (total parameter count, etc), but analytics applies the limits during
390
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
391
- * While integrating this API in your app you are strongly encouraged to enable
392
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
393
- * any errors in your events will show up in the firebase web console with links to relevant documentation
394
- *
395
- * @param analytics Analytics instance.
396
- * @param name Event name must not conflict with any Reserved Events.
397
- * @param params Parameters to be sent and displayed with the event.
398
- * @param options Additional options that can be passed. Web only.
399
- */
400
- export declare function logEvent<T extends string>(
401
- analytics: Analytics,
402
- name: FirebaseAnalyticsTypes.CustomEventName<T>,
403
- params?: {
404
- [key: string]: any;
405
- },
406
- options?: AnalyticsCallOptions,
407
- ): Promise<void>;
408
-
409
- /**
410
- * Log a custom event with optional params. Note that there are various limits that applied
411
- * to event parameters (total parameter count, etc), but analytics applies the limits during
412
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
413
- * While integrating this API in your app you are strongly encouraged to enable
414
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
415
- * any errors in your events will show up in the firebase web console with links to relevant documentation
416
- *
417
- * @param analytics Analytics instance.
418
- * @param name Event name must not conflict with any Reserved Events.
419
- * @param params Parameters to be sent and displayed with the event.
420
- * @param options Additional options that can be passed. Web only.
421
- */
422
- export declare function logEvent(
423
- analytics: Analytics,
424
- name: 'add_to_cart' | 'add_to_wishlist' | 'remove_from_cart',
425
- params?: {
426
- currency?: EventParams['currency'];
427
- value?: EventParams['value'];
428
- items?: EventParams['items'];
429
- [key: string]: any;
430
- },
431
- options?: AnalyticsCallOptions,
432
- ): Promise<void>;
433
-
434
- /**
435
- * Log a custom event with optional params. Note that there are various limits that applied
436
- * to event parameters (total parameter count, etc), but analytics applies the limits during
437
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
438
- * While integrating this API in your app you are strongly encouraged to enable
439
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
440
- * any errors in your events will show up in the firebase web console with links to relevant documentation
441
- *
442
- * @param analytics Analytics instance.
443
- * @param name Event name must not conflict with any Reserved Events.
444
- * @param params Parameters to be sent and displayed with the event.
445
- * @param options Additional options that can be passed. Web only.
446
- */
447
- export declare function logEvent(
448
- analytics: Analytics,
449
- name: 'begin_checkout',
450
- params?: {
451
- currency?: EventParams['currency'];
452
- coupon?: EventParams['coupon'];
453
- value?: EventParams['value'];
454
- items?: EventParams['items'];
455
- [key: string]: any;
456
- },
457
- options?: AnalyticsCallOptions,
458
- ): Promise<void>;
459
-
460
- /**
461
- * Log a custom event with optional params. Note that there are various limits that applied
462
- * to event parameters (total parameter count, etc), but analytics applies the limits during
463
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
464
- * While integrating this API in your app you are strongly encouraged to enable
465
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
466
- * any errors in your events will show up in the firebase web console with links to relevant documentation
467
- *
468
- * @param analytics Analytics instance.
469
- * @param name Event name must not conflict with any Reserved Events.
470
- * @param params Parameters to be sent and displayed with the event.
471
- * @param options Additional options that can be passed. Web only.
472
- */
473
- export declare function logEvent(
474
- analytics: Analytics,
475
- name: 'checkout_progress',
476
- params?: {
477
- currency?: EventParams['currency'];
478
- coupon?: EventParams['coupon'];
479
- value?: EventParams['value'];
480
- items?: EventParams['items'];
481
- checkout_step?: EventParams['checkout_step'];
482
- checkout_option?: EventParams['checkout_option'];
483
- [key: string]: any;
484
- },
485
- options?: AnalyticsCallOptions,
486
- ): Promise<void>;
487
-
488
- /**
489
- * Log a custom event with optional params. Note that there are various limits that applied
490
- * to event parameters (total parameter count, etc), but analytics applies the limits during
491
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
492
- * While integrating this API in your app you are strongly encouraged to enable
493
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
494
- * any errors in your events will show up in the firebase web console with links to relevant documentation
495
- *
496
- * @param analytics Analytics instance.
497
- * @param name Event name must not conflict with any Reserved Events.
498
- * @param params Parameters to be sent and displayed with the event.
499
- * @param options Additional options that can be passed. Web only.
500
- */
501
- export declare function logEvent(
502
- analytics: Analytics,
503
- name: 'exception',
504
- params?: {
505
- description?: EventParams['description'];
506
- fatal?: EventParams['fatal'];
507
- [key: string]: any;
508
- },
509
- options?: AnalyticsCallOptions,
510
- ): Promise<void>;
511
-
512
- /**
513
- * Log a custom event with optional params. Note that there are various limits that applied
514
- * to event parameters (total parameter count, etc), but analytics applies the limits during
515
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
516
- * While integrating this API in your app you are strongly encouraged to enable
517
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
518
- * any errors in your events will show up in the firebase web console with links to relevant documentation
519
- *
520
- * @param analytics Analytics instance.
521
- * @param name Event name must not conflict with any Reserved Events.
522
- * @param params Parameters to be sent and displayed with the event.
523
- * @param options Additional options that can be passed. Web only.
524
- */
525
- export declare function logEvent(
526
- analytics: Analytics,
527
- name: 'generate_lead',
528
- params?: {
529
- value?: EventParams['value'];
530
- currency?: EventParams['currency'];
531
- [key: string]: any;
532
- },
533
- options?: AnalyticsCallOptions,
534
- ): Promise<void>;
535
-
536
- /**
537
- * Log a custom event with optional params. Note that there are various limits that applied
538
- * to event parameters (total parameter count, etc), but analytics applies the limits during
539
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
540
- * While integrating this API in your app you are strongly encouraged to enable
541
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
542
- * any errors in your events will show up in the firebase web console with links to relevant documentation
543
- *
544
- * @param analytics Analytics instance.
545
- * @param name Event name must not conflict with any Reserved Events.
546
- * @param params Parameters to be sent and displayed with the event.
547
- * @param options Additional options that can be passed. Web only.
548
- */
549
- export declare function logEvent(
550
- analytics: Analytics,
551
- name: 'login',
552
- params?: {
553
- method?: EventParams['method'];
554
- [key: string]: any;
555
- },
556
- options?: AnalyticsCallOptions,
557
- ): Promise<void>;
558
-
559
- /**
560
- * Log a custom event with optional params. Note that there are various limits that applied
561
- * to event parameters (total parameter count, etc), but analytics applies the limits during
562
- * cloud processing, the errors will not be seen as Promise rejections when you call logEvent.
563
- * While integrating this API in your app you are strongly encouraged to enable
564
- * [DebugView](https://firebase.google.com/docs/analytics/debugview) -
565
- * any errors in your events will show up in the firebase web console with links to relevant documentation
566
- *
567
- * @param analytics Analytics instance.
568
- * @param name Event name must not conflict with any Reserved Events.
569
- * @param params Parameters to be sent and displayed with the event.
570
- * @param options Additional options that can be passed. Web only.
571
- */
572
- export declare function logEvent(
573
- analytics: Analytics,
574
- name: 'page_view',
575
- params?: {
576
- page_title?: string;
577
- page_location?: string;
578
- page_path?: string;
579
- [key: string]: any;
580
- },
581
- options?: AnalyticsCallOptions,
582
- ): Promise<void>;
583
-
584
- /**
585
- * If true, allows the device to collect analytical data and send it to
586
- * Firebase. Useful for GDPR.
587
- */
588
- export declare function setAnalyticsCollectionEnabled(
589
- analyticsInstance: Analytics,
590
- enabled: boolean,
591
- ): Promise<void>;
592
-
593
- /**
594
- * Sets the duration of inactivity that terminates the current session.
595
- *
596
- * @param analytics Analytics instance.
597
- * @param milliseconds The default value is 1800000 (30 minutes).
598
- */
599
- export declare function setSessionTimeoutDuration(
600
- analytics: Analytics,
601
- milliseconds: number,
602
- ): Promise<void>;
603
-
604
- /**
605
- * Retrieve the app instance id of the application.
606
- *
607
- * @param analytics Analytics instance.
608
- * @returns Returns the app instance id or null on android if FirebaseAnalytics.ConsentType.ANALYTICS_STORAGE has been set to FirebaseAnalytics.ConsentStatus.DENIED and null on iOS if ConsentType.analyticsStorage has been set to ConsentStatus.denied.
609
- */
610
- export function getAppInstanceId(analytics: Analytics): Promise<string | null>;
611
-
612
- /**
613
- * Gives a user a unique identification.
614
- *
615
- * @param analytics Analytics instance.
616
- * @param id Set to null to remove a previously assigned ID from analytics events
617
- * @param options Additional options that can be passed to Analytics method calls such as logEvent, etc.
618
- */
619
- export function setUserId(
620
- analytics: Analytics,
621
- id: string | null,
622
- options?: AnalyticsCallOptions,
623
- ): Promise<void>;
624
-
625
- /**
626
- * Sets a key/value pair of data on the current user. Each Firebase project can have up to 25 uniquely named (case-sensitive) user properties.
627
- *
628
- * @param analytics Analytics instance.
629
- * @param name A user property identifier.
630
- * @param value Set to null to remove a previously assigned ID from analytics events.
631
- */
632
- export function setUserProperty(
633
- analytics: Analytics,
634
- name: string,
635
- value: string | null,
636
- ): Promise<void>;
637
-
638
- /**
639
- * Sets multiple key/value pairs of data on the current user. Each Firebase project can have up to 25 uniquely named (case-sensitive) user properties.
640
- *
641
- * > When you set user properties, be sure to never include personally identifiable information such as names, social security numbers, or email addresses, even in hashed form.
642
- *
643
- * @param analytics Analytics instance.
644
- * @param properties Set a property value to null to remove it.
645
- * @param options `AnalyticsCallOptions`. Additional options that can be passed. Web only.
646
- */
647
- export function setUserProperties(
648
- analytics: Analytics,
649
- properties: { [key: string]: any },
650
- options?: AnalyticsCallOptions,
651
- ): Promise<void>;
652
-
653
- /**
654
- * Clears all analytics data for this instance from the device and resets the app instance ID.
655
- *
656
- * @param analytics Analytics instance.
657
- */
658
- export function resetAnalyticsData(analytics: Analytics): Promise<void>;
659
-
660
- /**
661
- * E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user. Note: This is different from the in-app purchase event, which is reported
662
- * automatically for Google Play-based apps.
663
- *
664
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
665
- *
666
- * Logged event name: `purchase`
667
- *
668
- * @param analytics Analytics instance.
669
- * @param object See {@link analytics.AddPaymentInfoEventParameters}.
670
- */
671
- export function logAddPaymentInfo(
672
- analytics: Analytics,
673
- object: FirebaseAnalyticsTypes.AddPaymentInfoEventParameters,
674
- ): Promise<void>;
675
-
676
- /**
677
- * Sets or clears the screen name and class the user is currently viewing
678
- *
679
- * @param analytics Analytics instance.
680
- * @param params See {@link analytics.ScreenViewParameters}.
681
- */
682
- export function logScreenView(
683
- analytics: Analytics,
684
- params: FirebaseAnalyticsTypes.ScreenViewParameters,
685
- ): Promise<void>;
686
-
687
- /**
688
- * Add Payment Info event. This event signifies that a user has submitted their payment information to your app.
689
- *
690
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
691
- *
692
- * Logged event name: `add_payment_info`
693
- *
694
- * @param analytics Analytics instance.
695
- * @param params See {@link analytics.AddShippingInfoParameters}.
696
- */
697
- export function logAddShippingInfo(
698
- analytics: Analytics,
699
- params: FirebaseAnalyticsTypes.AddShippingInfoParameters,
700
- ): Promise<void>;
701
-
702
- /**
703
- * E-Commerce Add To Cart event.
704
- *
705
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
706
- *
707
- * Logged event name: `add_to_cart`
708
- *
709
- * @param analytics Analytics instance.
710
- * @param params See {@link analytics.AddToCartEventParameters}.
711
- */
712
- export function logAddToCart(
713
- analytics: Analytics,
714
- params: FirebaseAnalyticsTypes.AddToCartEventParameters,
715
- ): Promise<void>;
716
-
717
- /**
718
- * E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist.
719
- * Use this event to identify popular gift items in your app.
720
- *
721
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
722
- *
723
- * Logged event name: `add_to_wishlist
724
- *
725
- * @param analytics Analytics instance.
726
- * @param params See {@link analytics.AddToWishlistEventParameters}.
727
- */
728
- export function logAddToWishlist(
729
- analytics,
730
- params: FirebaseAnalyticsTypes.AddToWishlistEventParameters,
731
- ): Promise<void>;
732
-
733
- /**
734
- * App Open event. By logging this event when an App is moved to the foreground, developers can
735
- * understand how often users leave and return during the course of a Session. Although Sessions
736
- * are automatically reported, this event can provide further clarification around the continuous
737
- * engagement of app-users.
738
- *
739
- * @param analytics Analytics instance.
740
- */
741
- export function logAppOpen(analytics: Analytics): Promise<void>;
742
-
743
- /**
744
- * E-Commerce Begin Checkout event. This event signifies that a user has begun the process of
745
- * checking out.
746
- *
747
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
748
- *
749
- * Logged event name: `begin_checkout`
750
- *
751
- * @param analytics Analytics instance.
752
- * @param params See {@link analytics.BeginCheckoutEventParameters}.
753
- */
754
- export function logBeginCheckout(
755
- analytics: Analytics,
756
- params: FirebaseAnalyticsTypes.BeginCheckoutEventParameters,
757
- ): Promise<void>;
758
-
759
- /**
760
- * Log this event to supply the referral details of a re-engagement campaign.
761
- *
762
- * Logged event name: `campaign_details`
763
- *
764
- * @param analytics Analytics instance.
765
- * @param params See {@link analytics.CampaignDetailsEventParameters}.
766
- */
767
- export function logCampaignDetails(
768
- analytics: Analytics,
769
- params: FirebaseAnalyticsTypes.CampaignDetailsEventParameters,
770
- ): Promise<void>;
771
-
772
- /**
773
- * Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log this along with
774
- * {@link analytics.logSpendVirtualCurrency} to better understand your virtual economy.
775
- *
776
- * Logged event name: `earn_virtual_currency`
777
- *
778
- * @param analytics Analytics instance.
779
- * @param params See {@link analytics.EarnVirtualCurrencyEventParameters}.
780
- */
781
- export function logEarnVirtualCurrency(
782
- analytics: Analytics,
783
- params: FirebaseAnalyticsTypes.EarnVirtualCurrencyEventParameters,
784
- ): Promise<void>;
785
-
786
- /**
787
- * Generate Lead event. Log this event when a lead has been generated in the app to understand
788
- * the efficacy of your install and re-engagement campaigns.
789
- *
790
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
791
- *
792
- * Logged event name: `generate_lead`
793
- *
794
- * @param analytics Analytics instance.
795
- * @param params See {@link analytics.GenerateLeadEventParameters}.
796
- */
797
- export function logGenerateLead(
798
- analytics: Analytics,
799
- params: FirebaseAnalyticsTypes.GenerateLeadEventParameters,
800
- ): Promise<void>;
801
-
802
- /**
803
- * Join Group event. Log this event when a user joins a group such as a guild, team or family.
804
- * Use this event to analyze how popular certain groups or social features are in your app
805
- *
806
- * Logged event name: `join_group`
807
- *
808
- * @param analytics Analytics instance.
809
- * @param params See {@link analytics.JoinGroupEventParameters}.
810
- */
811
- export function logJoinGroup(
812
- analytics: Analytics,
813
- params: FirebaseAnalyticsTypes.JoinGroupEventParameters,
814
- ): Promise<void>;
815
-
816
- /**
817
- * Level End event.
818
- *
819
- * Logged event name: `level_end`
820
- *
821
- * @param analytics Analytics instance.
822
- * @param params See {@link analytics.LevelEndEventParameters}.
823
- */
824
- export function logLevelEnd(
825
- analytics: Analytics,
826
- params: FirebaseAnalyticsTypes.LevelEndEventParameters,
827
- ): Promise<void>;
828
-
829
- /**
830
- * Level Start event.
831
- *
832
- * Logged event name: `level_start`
833
- *
834
- * @param analytics Analytics instance.
835
- * @param params See {@link analytics.LevelStartEventParameters}.
836
- */
837
- export function logLevelStart(
838
- analytics: Analytics,
839
- params: FirebaseAnalyticsTypes.LevelStartEventParameters,
840
- ): Promise<void>;
841
-
842
- /**
843
- * Level Up event. This event signifies that a player has leveled up in your gaming app.
844
- * It can help you gauge the level distribution of your userbase and help you identify certain levels that are difficult to pass.
845
- *
846
- * Logged event name: `level_up`
847
- *
848
- * @param analytics Analytics instance.
849
- * @param params See {@link analytics.LevelUpEventParameters}.
850
- */
851
- export function logLevelUp(
852
- analytics: Analytics,
853
- params: FirebaseAnalyticsTypes.LevelUpEventParameters,
854
- ): Promise<void>;
855
-
856
- /**
857
- * Login event. Apps with a login feature can report this event to signify that a user has logged in.
858
- *
859
- * Logged event name: `login`
860
- *
861
- * @param analytics Analytics instance.
862
- * @param params See {@link analytics.LoginEventParameters}.
863
- */
864
- export function logLogin(
865
- analytics: Analytics,
866
- params: FirebaseAnalyticsTypes.LoginEventParameters,
867
- ): Promise<void>;
868
-
869
- /**
870
- * Post Score event. Log this event when the user posts a score in your gaming app. This event can
871
- * help you understand how users are actually performing in your game and it can help you correlate
872
- * high scores with certain audiences or behaviors.
873
- *
874
- * Logged event name: `post_score`
875
- *
876
- * @param analytics Analytics instance.
877
- * @param params See {@link analytics.PostScoreEventParameters}.
878
- */
879
- export function logPostScore(
880
- analytics: Analytics,
881
- params: FirebaseAnalyticsTypes.PostScoreEventParameters,
882
- ): Promise<void>;
883
-
884
- /**
885
- * Select Content event. This general purpose event signifies that a user has selected some
886
- * content of a certain type in an app. The content can be any object in your app. This event
887
- * can help you identify popular content and categories of content in your app.
888
- *
889
- * Logged event name: `select_content`
890
- *
891
- * @param analytics Analytics instance.
892
- * @param params See {@link analytics.SelectContentEventParameters}.
893
- */
894
- export function logSelectContent(
895
- analytics: Analytics,
896
- params: FirebaseAnalyticsTypes.SelectContentEventParameters,
897
- ): Promise<void>;
898
-
899
- /**
900
- * E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user. Note: This is different from the in-app purchase event, which is reported
901
- * automatically for Google Play-based apps.
902
- *
903
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
904
- *
905
- * Logged event name: `purchase`
906
- *
907
- * @param analytics Analytics instance.
908
- * @param params See {@link analytics.PurchaseEventParameters}.
909
- */
910
- export function logPurchase(
911
- analytics: Analytics,
912
- params: FirebaseAnalyticsTypes.PurchaseEventParameters,
913
- ): Promise<void>;
914
-
915
- /**
916
- * E-Commerce Refund event. This event signifies that a refund was issued.
917
- *
918
- * Logged event name: `remove_from_cart`
919
- *
920
- * @param analytics Analytics instance.
921
- * @param params See {@link analytics.RefundEventParameters}.
922
- */
923
- export function logRefund(
924
- analytics: Analytics,
925
- params: FirebaseAnalyticsTypes.RefundEventParameters,
926
- ): Promise<void>;
927
-
928
- /**
929
- * Remove from cart event.
930
- *
931
- * Logged event name: `remove_from_cart`
932
- *
933
- * @param analytics Analytics instance.
934
- * @param params See {@link analytics.RemoveFromCartEventParameters}.
935
- */
936
- export function logRemoveFromCart(
937
- analytics: Analytics,
938
- params: FirebaseAnalyticsTypes.RemoveFromCartEventParameters,
939
- ): Promise<void>;
940
-
941
- /**
942
- * Search event. Apps that support search features can use this event to contextualize search
943
- * operations by supplying the appropriate, corresponding parameters. This event can help you
944
- * identify the most popular content in your app.
945
- *
946
- * Logged event name: `search`
947
- *
948
- * @param analytics Analytics instance.
949
- * @param params See {@link analytics.SearchEventParameters}.
950
- */
951
- export function logSearch(
952
- analytics: Analytics,
953
- params: FirebaseAnalyticsTypes.SearchEventParameters,
954
- ): Promise<void>;
955
-
956
- /**
957
- * Select Item event. This event signifies that an item was selected by a user from a list.
958
- * Use the appropriate parameters to contextualize the event.
959
- * Use this event to discover the most popular items selected.
960
- *
961
- * Logged event name: `select_item`
962
- *
963
- * @param analytics Analytics instance.
964
- * @param params See {@link analytics.SelectItemEventParameters}.
965
- */
966
- export function logSelectItem(
967
- analytics: Analytics,
968
- params: FirebaseAnalyticsTypes.SelectItemEventParameters,
969
- ): Promise<void>;
970
-
971
- /**
972
- * Set checkout option event.
973
- *
974
- * Logged event name: `set_checkout_option`
975
- *
976
- * @param analytics Analytics instance.
977
- * @param params See {@link analytics.SetCheckoutOptionEventParameters}.
978
- */
979
- export function logSetCheckoutOption(
980
- analytics: Analytics,
981
- params: FirebaseAnalyticsTypes.SetCheckoutOptionEventParameters,
982
- ): Promise<void>;
983
-
984
- /**
985
- * Select promotion event. This event signifies that a user has selected a promotion offer. Use the
986
- * appropriate parameters to contextualize the event, such as the item(s) for which the promotion applies.
987
- *
988
- * Logged event name: `select_promotion`
989
- *
990
- * @param analytics Analytics instance.
991
- * @param params See {@link analytics.SelectPromotionEventParameters}.
992
- */
993
- export function logSelectPromotion(
994
- analytics: Analytics,
995
- params: FirebaseAnalyticsTypes.SelectPromotionEventParameters,
996
- ): Promise<void>;
997
-
998
- /**
999
- * Share event. Apps with social features can log the Share event to identify the most viral content.
1000
- *
1001
- * Logged event name: `share`
1002
- *
1003
- * @param analytics Analytics instance.
1004
- * @param params See {@link analytics.ShareEventParameters}.
1005
- */
1006
- export function logShare(
1007
- analytics: Analytics,
1008
- params: FirebaseAnalyticsTypes.ShareEventParameters,
1009
- ): Promise<void>;
1010
-
1011
- /**
1012
- * Sign Up event. This event indicates that a user has signed up for an account in your app.
1013
- * The parameter signifies the method by which the user signed up. Use this event to understand
1014
- * the different behaviors between logged in and logged out users.
1015
- *
1016
- * Logged event name: `sign_up`
1017
- *
1018
- * @param analytics Analytics instance.
1019
- * @param params See {@link analytics.SignUpEventParameters}.
1020
- */
1021
- export function logSignUp(
1022
- analytics: Analytics,
1023
- params: FirebaseAnalyticsTypes.SignUpEventParameters,
1024
- ): Promise<void>;
1025
-
1026
- /**
1027
- * Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can
1028
- * help you identify which virtual goods are the most popular objects of purchase.
1029
- *
1030
- * Logged event name: `spend_virtual_currency`
1031
- *
1032
- * @param analytics Analytics instance.
1033
- * @param params See {@link analytics.SpendVirtualCurrencyEventParameters}.
1034
- */
1035
- export function logSpendVirtualCurrency(
1036
- analytics: Analytics,
1037
- params: FirebaseAnalyticsTypes.SpendVirtualCurrencyEventParameters,
1038
- ): Promise<void>;
1039
-
1040
- /**
1041
- * Tutorial Begin event. This event signifies the start of the on-boarding process in your app.
1042
- * Use this in a funnel with {@link analytics#logTutorialComplete} to understand how many users
1043
- * complete this process and move on to the full app experience.
1044
- *
1045
- * Logged event name: `tutorial_begin`
1046
- *
1047
- * @param analytics Analytics instance.
1048
- */
1049
- export function logTutorialBegin(analytics: Analytics): Promise<void>;
1050
-
1051
- /**
1052
- * Tutorial End event. Use this event to signify the user's completion of your app's on-boarding process.
1053
- * Add this to a funnel with {@link analytics#logTutorialBegin} to understand how many users
1054
- * complete this process and move on to the full app experience.
1055
- *
1056
- * Logged event name: `tutorial_complete`
1057
- *
1058
- * @param analytics Analytics instance.
1059
- */
1060
- export function logTutorialComplete(analytics: Analytics): Promise<void>;
1061
-
1062
- /**
1063
- * Unlock Achievement event. Log this event when the user has unlocked an achievement in your game.
1064
- * Since achievements generally represent the breadth of a gaming experience, this event can help
1065
- * you understand how many users are experiencing all that your game has to offer.
1066
- *
1067
- * Logged event name: `unlock_achievement`
1068
- *
1069
- * @param analytics Analytics instance.
1070
- * @param params See {@link analytics.UnlockAchievementEventParameters}.
1071
- */
1072
- export function logUnlockAchievement(
1073
- analytics: Analytics,
1074
- params: FirebaseAnalyticsTypes.UnlockAchievementEventParameters,
1075
- ): Promise<void>;
1076
-
1077
- /**
1078
- * E-commerce View Cart event. This event signifies that a user has viewed their cart. Use this to analyze your purchase funnel.
1079
- *
1080
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
1081
- *
1082
- * Logged event name: `view_cart`
1083
- *
1084
- * @param analytics Analytics instance.
1085
- * @param params See {@link analytics.ViewCartEventParameters}.
1086
- */
1087
- export function logViewCart(
1088
- analytics: Analytics,
1089
- params: FirebaseAnalyticsTypes.ViewCartEventParameters,
1090
- ): Promise<void>;
1091
-
1092
- /**
1093
- * View Item event. This event signifies that some content was shown to the user. This content
1094
- * may be a product, a screen or just a simple image or text. Use the appropriate parameters
1095
- * to contextualize the event. Use this event to discover the most popular items viewed in your app.
1096
- *
1097
- * If you supply the `value` parameter, you must also supply the `currency` parameter so that revenue metrics can be computed accurately.
1098
- *
1099
- * Logged event name: `view_item`
1100
- *
1101
- * @param analytics Analytics instance.
1102
- * @param params See {@link analytics.ViewItemEventParameters}.
1103
- */
1104
- export function logViewItem(
1105
- analytics: Analytics,
1106
- params: FirebaseAnalyticsTypes.ViewItemEventParameters,
1107
- ): Promise<void>;
1108
-
1109
- /**
1110
- * View Item List event. Log this event when the user has been presented with a list of items of a certain category.
1111
- *
1112
- * Logged event name: `view_item_list`
1113
- *
1114
- * @param analytics Analytics instance.
1115
- * @param params See {@link analytics.ViewItemListEventParameters}.
1116
- */
1117
- export function logViewItemList(
1118
- analytics: Analytics,
1119
- params: FirebaseAnalyticsTypes.ViewItemListEventParameters,
1120
- ): Promise<void>;
1121
-
1122
- /**
1123
- * View Promotion event. This event signifies that a promotion was shown to a user.
1124
- *
1125
- * Logged event name: `view_promotion`
1126
- *
1127
- * @param analytics Analytics instance.
1128
- * @param params See {@link analytics.ViewPromotionEventParameters}.
1129
- */
1130
- export function logViewPromotion(
1131
- analytics: Analytics,
1132
- params: FirebaseAnalyticsTypes.ViewPromotionEventParameters,
1133
- ): Promise<void>;
1134
-
1135
- /**
1136
- * View Search Results event. Log this event when the user has been presented with the results of a search.
1137
- *
1138
- * Logged event name: `view_search_results`
1139
- *
1140
- * @param analytics Analytics instance.
1141
- * @param params See {@link analytics.ViewSearchResultsParameters}.
1142
- */
1143
- export function logViewSearchResults(
1144
- analytics: Analytics,
1145
- params: FirebaseAnalyticsTypes.ViewSearchResultsParameters,
1146
- ): Promise<void>;
1147
-
1148
- /**
1149
- * Adds parameters that will be set on every event logged from the SDK, including automatic ones.
1150
- *
1151
- * They will be added to the map of default event parameters, replacing any existing
1152
- * parameter with the same name. Valid parameter values are String, long, and double.
1153
- * Setting a key's value to null will clear that parameter. Passing in a null bundle
1154
- * will clear all parameters.
1155
- * For Web, the values passed persist on the current page and are passed with all
1156
- * subsequent events.
1157
- *
1158
- * @platform ios
1159
- * @param analytics Analytics instance.
1160
- * @param params Parameters to be added to the map of parameters added to every event.
1161
- */
1162
- export function setDefaultEventParameters(
1163
- analytics: Analytics,
1164
- params: { [p: string]: any },
1165
- ): Promise<void>;
1166
-
1167
- /**
1168
- * Start privacy-sensitive on-device conversion management.
1169
- * This is iOS-only.
1170
- * This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile.
1171
- *
1172
- * @platform ios
1173
- * @param analytics Analytics instance.
1174
- * @param emailAddress email address, properly formatted complete with domain name e.g, 'user@example.com'
1175
- */
1176
- export function initiateOnDeviceConversionMeasurementWithEmailAddress(
1177
- analytics: Analytics,
1178
- emailAddress: string,
1179
- ): Promise<void>;
1180
-
1181
- /**
1182
- * Start privacy-sensitive on-device conversion management.
1183
- * This is iOS-only.
1184
- * This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile.
1185
- * You need to pass the sha256-hashed of normalized email address to this function. See [this link](https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3#use-hashed-credentials) for more information.
1186
- *
1187
- * @platform ios
1188
- * @param analytics Analytics instance.
1189
- * @param hashedEmailAddress sha256-hashed of normalized email address, properly formatted complete with domain name e.g, 'user@example.com'
1190
- */
1191
- export function initiateOnDeviceConversionMeasurementWithHashedEmailAddress(
1192
- analytics: Analytics,
1193
- hashedEmailAddress: string,
1194
- ): Promise<void>;
1195
-
1196
- /**
1197
- * Start privacy-sensitive on-device conversion management.
1198
- * This is iOS-only.
1199
- * This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile.
1200
- *
1201
- * @platform ios
1202
- * @param analytics Analytics instance.
1203
- * @param phoneNumber phone number in E.164 format - that is a leading + sign, then up to 15 digits, no dashes or spaces.
1204
- */
1205
- export function initiateOnDeviceConversionMeasurementWithPhoneNumber(
1206
- analytics: Analytics,
1207
- phoneNumber: string,
1208
- ): Promise<void>;
1209
-
1210
- /**
1211
- * Start privacy-sensitive on-device conversion management.
1212
- * This is iOS-only.
1213
- * This is a no-op if you do not include '$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true' in your Podfile.
1214
- * You need to pass the sha256-hashed of phone number in E.164 format. See [this link](https://firebase.google.com/docs/tutorials/ads-ios-on-device-measurement/step-3#use-hashed-credentials) for more information.
1215
- *
1216
- * @platform ios
1217
- * @param analytics Analytics instance.
1218
- * @param hashedPhoneNumber sha256-hashed of normalized phone number in E.164 format - that is a leading + sign, then up to 15 digits, no dashes or spaces.
1219
- */
1220
- export function initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(
1221
- analytics: Analytics,
1222
- hashedPhoneNumber: string,
1223
- ): Promise<void>;
1224
-
1225
- /**
1226
- * Checks four different things.
1227
- * 1. Checks if it's not a browser extension environment.
1228
- * 2. Checks if cookies are enabled in current browser.
1229
- * 3. Checks if IndexedDB is supported by the browser environment.
1230
- * 4. Checks if the current browser context is valid for using IndexedDB.open().
1231
- *
1232
- * @returns {Promise<boolean>}
1233
- */
1234
- export function isSupported(): Promise<boolean>;
1235
-
1236
- /**
1237
- * Sets the applicable end user consent state for this app.
1238
- * references once Firebase Analytics is initialized.
1239
- * @param analytics Analytics instance.
1240
- * @param consentSettings See {@link analytics.ConsentSettings}.
1241
- * @returns {Promise<void>}
1242
- */
1243
- export function setConsent(
1244
- analytics: Analytics,
1245
- consentSettings: FirebaseAnalyticsTypes.ConsentSettings,
1246
- ): Promise<void>;
1247
-
1248
- /**
1249
- * Configures Firebase Analytics to use custom gtag or dataLayer names.
1250
- * Intended to be used if gtag.js script has been installed on this page
1251
- * independently of Firebase Analytics, and is using non-default names for
1252
- * either the gtag function or for dataLayer. Must be called before calling
1253
- * `getAnalytics()` or it won't have any effect. Web only.
1254
- * @param options See {@link analytics.SettingsOptions}.
1255
- * @returns {void}
1256
- */
1257
- export function settings(options: FirebaseAnalyticsTypes.SettingsOptions): void;
1258
-
1259
- /**
1260
- * Retrieves the session id from the client.
1261
- * On iOS, Firebase SDK may return an error that is handled internally and may take many minutes to return a valid value. Check native debug logs for more details.
1262
- *
1263
- * Returns the session id or null if session is expired, null on android if FirebaseAnalytics.ConsentType.ANALYTICS_STORAGE has been set to FirebaseAnalytics.ConsentStatus.DENIED and null on iOS if ConsentType.analyticsStorage has been set to ConsentStatus.denied.
1264
- * @param {Analytics} instance.
1265
- * @returns {Promise<number | null>}
1266
- */
1267
- export function getSessionId(analytics: Analytics): Promise<number | null>;