@react-native-firebase/analytics 23.7.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 -1085
  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
@@ -0,0 +1,944 @@
1
+ import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
+ /**
3
+ * A currency amount.
4
+ */
5
+ export type Currency = number;
6
+ /**
7
+ * Consent status string values.
8
+ */
9
+ export type ConsentStatusString = 'granted' | 'denied';
10
+ /**
11
+ * Promotion object for analytics events.
12
+ */
13
+ export interface Promotion {
14
+ /**
15
+ * The name of a creative used in a promotional spot
16
+ */
17
+ creative_name?: string;
18
+ /**
19
+ * The name of a creative slot
20
+ */
21
+ creative_slot?: string;
22
+ /**
23
+ * The ID of a product promotion
24
+ */
25
+ promotion_id?: string;
26
+ /**
27
+ * The name of a product promotion
28
+ */
29
+ promotion_name?: string;
30
+ [key: string]: any;
31
+ }
32
+ export interface Item {
33
+ /**
34
+ * The item's brand.
35
+ */
36
+ item_brand?: string;
37
+ /**
38
+ * An item ID.
39
+ */
40
+ item_id?: string;
41
+ /**
42
+ * An item name.
43
+ */
44
+ item_name?: string;
45
+ /**
46
+ * First class item category.
47
+ */
48
+ item_category?: string;
49
+ /**
50
+ * Second class item category.
51
+ */
52
+ item_category2?: string;
53
+ /**
54
+ * Third class item category.
55
+ */
56
+ item_category3?: string;
57
+ /**
58
+ * Fourth class item category.
59
+ */
60
+ item_category4?: string;
61
+ /**
62
+ * Fifth class item category.
63
+ */
64
+ item_category5?: string;
65
+ /**
66
+ * The ID of the list in which the item was presented to the user.
67
+ */
68
+ item_list_id?: string;
69
+ /**
70
+ * The name of the list in which the item was presented to the user.
71
+ */
72
+ item_list_name?: string;
73
+ /**
74
+ * The Google [Place ID](https://developers.google.com/places/place-id) that corresponds to the associated item (String). Alternatively, you can supply your own custom Location ID.
75
+ */
76
+ location_id?: string;
77
+ /**
78
+ * The Item variant.
79
+ */
80
+ item_variant?: string;
81
+ /**
82
+ * The Item quantity.
83
+ */
84
+ quantity?: number;
85
+ /**
86
+ * The Item price.
87
+ * Note that firebase analytics will display this as an integer with trailing zeros, due to some firebase-internal conversion.
88
+ * See https://github.com/invertase/react-native-firebase/issues/4578#issuecomment-771703420 for more information
89
+ */
90
+ price?: number;
91
+ /**
92
+ * The affiliation of the item.
93
+ */
94
+ affiliation?: string;
95
+ /**
96
+ * The coupon associated with the item.
97
+ */
98
+ coupon?: string;
99
+ /**
100
+ * The creative name associated with the item.
101
+ */
102
+ creative_name?: string;
103
+ /**
104
+ * The creative slot associated with the item.
105
+ */
106
+ creative_slot?: string;
107
+ /**
108
+ * The discount applied to the item.
109
+ */
110
+ discount?: Currency;
111
+ /**
112
+ * The index of the item.
113
+ */
114
+ index?: number;
115
+ /**
116
+ * The promotion ID associated with the item.
117
+ */
118
+ promotion_id?: string;
119
+ /**
120
+ * The promotion name associated with the item.
121
+ */
122
+ promotion_name?: string;
123
+ /**
124
+ * Custom event parameters. The parameter names can be up to 40 characters long and must start with an alphabetic character and contain only alphanumeric characters and underscores. String parameter values can be up to 100 characters long.
125
+ * The "firebase_", "google_" and "ga_" prefixes are reserved and should not be used for parameter names.
126
+ */
127
+ [key: string]: string | number | undefined;
128
+ }
129
+ export interface AddPaymentInfoEventParameters {
130
+ items?: Item[];
131
+ /**
132
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
133
+ */
134
+ currency?: string;
135
+ value?: number;
136
+ /**
137
+ * Coupon code for a purchasable item.
138
+ */
139
+ coupon?: string;
140
+ /**
141
+ * The chosen method of payment
142
+ */
143
+ payment_type?: string;
144
+ }
145
+ export interface AddShippingInfoEventParameters {
146
+ items?: Item[];
147
+ /**
148
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
149
+ */
150
+ currency?: string;
151
+ value?: number;
152
+ /**
153
+ * Coupon code for a purchasable item.
154
+ */
155
+ coupon?: string;
156
+ /**
157
+ * The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item
158
+ */
159
+ shipping_tier?: string;
160
+ }
161
+ export interface AddToCartEventParameters {
162
+ items?: Item[];
163
+ /**
164
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
165
+ */
166
+ currency?: string;
167
+ /**
168
+ * value of item
169
+ */
170
+ value?: number;
171
+ }
172
+ export interface AddToWishlistEventParameters {
173
+ items?: Item[];
174
+ /**
175
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
176
+ */
177
+ currency?: string;
178
+ value?: number;
179
+ }
180
+ export interface BeginCheckoutEventParameters {
181
+ /**
182
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
183
+ */
184
+ currency?: string;
185
+ value?: number;
186
+ /**
187
+ * Coupon code for a purchasable item.
188
+ */
189
+ coupon?: string;
190
+ items?: Item[];
191
+ /**
192
+ * Custom event parameters.
193
+ */
194
+ [key: string]: any;
195
+ }
196
+ export interface CampaignDetailsEventParameters {
197
+ /**
198
+ * Used to identify a search engine, newsletter, or other source.
199
+ */
200
+ source: string;
201
+ /**
202
+ * Used to identify a medium such as email or cost-per-click (cpc).
203
+ */
204
+ medium: string;
205
+ /**
206
+ * Used for keyword analysis to identify a specific product promotion or strategic campaign.
207
+ */
208
+ campaign: string;
209
+ /**
210
+ * Used with paid search to supply the keywords for ads.
211
+ */
212
+ term?: string;
213
+ /**
214
+ * Used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL.
215
+ */
216
+ content?: string;
217
+ /**
218
+ * A campaign detail click ID.
219
+ */
220
+ aclid?: string;
221
+ cp1?: string;
222
+ }
223
+ export interface EarnVirtualCurrencyEventParameters {
224
+ /**
225
+ * Name of virtual currency type. E.g. `gems`.
226
+ */
227
+ virtual_currency_name: string;
228
+ /**
229
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
230
+ * can include revenue, distance, time and points.
231
+ */
232
+ value: number;
233
+ }
234
+ export interface GenerateLeadEventParameters {
235
+ /**
236
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
237
+ */
238
+ currency?: string;
239
+ /**
240
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
241
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
242
+ * parameter should also be defined.
243
+ */
244
+ value?: number;
245
+ }
246
+ export interface JoinGroupEventParameters {
247
+ /**
248
+ * Group/clan/guild id.
249
+ */
250
+ group_id: string;
251
+ }
252
+ export interface LevelEndEventParameters {
253
+ /**
254
+ * Level in game.
255
+ */
256
+ level: number;
257
+ /**
258
+ * The result of an operation.
259
+ */
260
+ success?: string;
261
+ }
262
+ export interface LevelStartEventParameters {
263
+ /**
264
+ * Level in game.
265
+ */
266
+ level: number;
267
+ }
268
+ export interface LevelUpEventParameters {
269
+ /**
270
+ * Level in game.
271
+ */
272
+ level: number;
273
+ /**
274
+ * Character used in game.
275
+ */
276
+ character?: string;
277
+ }
278
+ export interface LoginEventParameters {
279
+ /**
280
+ * The login method. E.g. `facebook.com`.
281
+ */
282
+ method: string;
283
+ }
284
+ export interface PostScoreEventParameters {
285
+ /**
286
+ * Score in game.
287
+ */
288
+ score: number;
289
+ /**
290
+ * Level in game.
291
+ */
292
+ level?: number;
293
+ /**
294
+ * Character used in game.
295
+ */
296
+ character?: string;
297
+ }
298
+ export interface PurchaseEventParameters {
299
+ /**
300
+ * A product affiliation to designate a supplying company or brick and mortar store location
301
+ */
302
+ affiliation?: string;
303
+ /**
304
+ * Coupon code for a purchasable item.
305
+ */
306
+ coupon?: string;
307
+ /**
308
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
309
+ */
310
+ currency?: string;
311
+ items?: Item[];
312
+ /**
313
+ * Shipping cost.
314
+ */
315
+ shipping?: number;
316
+ /**
317
+ * Tax amount.
318
+ */
319
+ tax?: number;
320
+ /**
321
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
322
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
323
+ * parameter should also be defined.
324
+ */
325
+ value?: number;
326
+ /**
327
+ * A single ID for a ecommerce group transaction.
328
+ */
329
+ transaction_id?: string;
330
+ /**
331
+ * Custom event parameters.
332
+ */
333
+ [key: string]: any;
334
+ }
335
+ export interface ScreenViewParameters {
336
+ /**
337
+ * Screen name the user is currently viewing.
338
+ */
339
+ screen_name?: string;
340
+ /**
341
+ * Current class associated with the view the user is currently viewing.
342
+ */
343
+ screen_class?: string;
344
+ /**
345
+ * Custom event parameters.
346
+ */
347
+ [key: string]: any;
348
+ }
349
+ export interface RefundEventParameters {
350
+ /**
351
+ * A product affiliation to designate a supplying company or brick and mortar store location
352
+ */
353
+ affiliation?: string;
354
+ /**
355
+ * Coupon code for a purchasable item.
356
+ */
357
+ coupon?: string;
358
+ /**
359
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
360
+ */
361
+ currency?: string;
362
+ items?: Item[];
363
+ /**
364
+ * Shipping cost.
365
+ */
366
+ shipping?: number;
367
+ /**
368
+ * Tax amount.
369
+ */
370
+ tax?: number;
371
+ /**
372
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
373
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
374
+ * parameter should also be defined.
375
+ */
376
+ value?: number;
377
+ /**
378
+ * A single ID for a ecommerce group transaction.
379
+ */
380
+ transaction_id?: string;
381
+ }
382
+ export interface RemoveFromCartEventParameters {
383
+ items?: Item[];
384
+ /**
385
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
386
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
387
+ * parameter should also be defined.
388
+ */
389
+ value?: number;
390
+ /**
391
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
392
+ x */
393
+ currency?: string;
394
+ }
395
+ export interface SearchEventParameters {
396
+ search_term: string;
397
+ /**
398
+ * Number of nights staying at hotel.
399
+ */
400
+ number_of_nights?: number;
401
+ /**
402
+ * Number of rooms for travel events.
403
+ */
404
+ number_of_rooms?: number;
405
+ /**
406
+ * Number of passengers traveling.
407
+ */
408
+ number_of_passengers?: number;
409
+ /**
410
+ * Flight or Travel origin. E.g. `Mountain View, CA`.
411
+ */
412
+ origin?: string;
413
+ /**
414
+ * Flight or Travel destination. E.g. `Mountain View, CA`.
415
+ */
416
+ destination?: string;
417
+ /**
418
+ * The departure date, check-in date, or rental start date for the item (String). The parameter expects a date formatted as YYYY-MM-DD.
419
+ */
420
+ start_date?: string;
421
+ /**
422
+ * The arrival date, check-out date, or rental end date for the item (String). The parameter expects a date formatted as YYYY-MM-DD.
423
+ */
424
+ end_date?: string;
425
+ /**
426
+ * Travel class. E.g. `business`.
427
+ */
428
+ travel_class?: string;
429
+ }
430
+ export interface SelectContentEventParameters {
431
+ content_type: string;
432
+ /**
433
+ * An item ID.
434
+ */
435
+ item_id: string;
436
+ }
437
+ export interface SelectItemEventParameters {
438
+ items?: Item[];
439
+ content_type: string;
440
+ /**
441
+ * The ID of the list in which the item was presented to the user
442
+ */
443
+ item_list_id: string;
444
+ /**
445
+ * The name of the list in which the item was presented to the user
446
+ */
447
+ item_list_name: string;
448
+ }
449
+ export interface SetCheckoutOptionEventParameters {
450
+ checkout_step?: EventParams['checkout_step'];
451
+ checkout_option?: EventParams['checkout_option'];
452
+ [key: string]: any;
453
+ }
454
+ export interface SelectPromotionEventParameters {
455
+ /**
456
+ * The name of a creative used in a promotional spot
457
+ */
458
+ creative_name: string;
459
+ /**
460
+ * The name of a creative slot
461
+ */
462
+ creative_slot: string;
463
+ items?: Item[];
464
+ /**
465
+ * The location associated with the event. Preferred to be the Google Place ID that corresponds to the associated item but could be overridden to a custom location ID string
466
+ */
467
+ location_id: string;
468
+ /**
469
+ * The ID of a product promotion
470
+ */
471
+ promotion_id: string;
472
+ /**
473
+ * The name of a product promotion
474
+ */
475
+ promotion_name: string;
476
+ }
477
+ export interface ShareEventParameters {
478
+ /**
479
+ * Type of content selected.
480
+ */
481
+ content_type: string;
482
+ /**
483
+ * An item ID.
484
+ */
485
+ item_id: string;
486
+ /**
487
+ * A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event.
488
+ */
489
+ method: string;
490
+ }
491
+ export interface SignUpEventParameters {
492
+ /**
493
+ * A particular approach used in an operation; for example, "facebook" or "email" in the context of a sign_up or login event.
494
+ */
495
+ method: string;
496
+ }
497
+ export interface SpendVirtualCurrencyEventParameters {
498
+ /**
499
+ * An item name.
500
+ */
501
+ item_name: string;
502
+ /**
503
+ * Name of virtual currency type. E.g. `gems`.
504
+ */
505
+ virtual_currency_name: string;
506
+ /**
507
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
508
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
509
+ * parameter should also be defined.
510
+ */
511
+ value: number;
512
+ }
513
+ export interface UnlockAchievementEventParameters {
514
+ /**
515
+ * Game achievement ID (String).
516
+ */
517
+ achievement_id: string;
518
+ }
519
+ export interface ViewCartEventParameters {
520
+ items?: Item[];
521
+ /**
522
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
523
+ */
524
+ currency?: string;
525
+ /**
526
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
527
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
528
+ * parameter should also be defined.
529
+ */
530
+ value?: number;
531
+ }
532
+ export interface ViewItemEventParameters {
533
+ items?: Item[];
534
+ /**
535
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
536
+ */
537
+ currency?: string;
538
+ /**
539
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
540
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
541
+ * parameter should also be defined.
542
+ */
543
+ value?: number;
544
+ }
545
+ export interface ViewSearchResultsParameters {
546
+ /**
547
+ * The search string/keywords used.
548
+ */
549
+ search_term: string;
550
+ }
551
+ export interface ViewItemListEventParameters {
552
+ items?: Item[];
553
+ /**
554
+ * The ID of the list in which the item was presented to the user
555
+ */
556
+ item_list_id?: string;
557
+ /**
558
+ * The name of the list in which the item was presented to the user
559
+ */
560
+ item_list_name?: string;
561
+ }
562
+ export interface ViewPromotionEventParameters {
563
+ items?: Item[];
564
+ /**
565
+ * The location associated with the event. Preferred to be the Google Place ID that corresponds to the associated item but could be overridden to a custom location ID string
566
+ */
567
+ location_id?: string;
568
+ /**
569
+ * The name of a creative used in a promotional spot
570
+ */
571
+ creative_name?: string;
572
+ /**
573
+ * The name of a creative slot
574
+ */
575
+ creative_slot?: string;
576
+ /**
577
+ * The ID of a product promotion
578
+ */
579
+ promotion_id?: string;
580
+ /**
581
+ * The name of a product promotion
582
+ */
583
+ promotion_name?: string;
584
+ }
585
+ export interface AddShippingInfoParameters {
586
+ items?: Item[];
587
+ /**
588
+ * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
589
+ */
590
+ currency?: string;
591
+ /**
592
+ * A context-specific numeric value which is accumulated automatically for each event type. Values
593
+ * can include revenue, distance, time and points. When a value is set, the accompanying `currency`
594
+ * parameter should also be defined.
595
+ */
596
+ value?: number;
597
+ /**
598
+ * Coupon code for a purchasable item.
599
+ */
600
+ coupon?: string;
601
+ /**
602
+ * The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item
603
+ */
604
+ shipping_tier?: string;
605
+ }
606
+ /**
607
+ * Standard gtag.js event parameters. For more information, see the GA4 reference documentation. Web only.
608
+ */
609
+ export interface EventParams {
610
+ checkout_option?: string;
611
+ checkout_step?: number;
612
+ item_id?: string;
613
+ content_type?: string;
614
+ coupon?: string;
615
+ currency?: string;
616
+ description?: string;
617
+ fatal?: boolean;
618
+ items?: Item[];
619
+ method?: string;
620
+ number?: string;
621
+ promotions?: Promotion[];
622
+ screen_name?: string;
623
+ /**
624
+ * Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
625
+ */
626
+ firebase_screen?: string;
627
+ /**
628
+ * Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
629
+ */
630
+ firebase_screen_class?: string;
631
+ search_term?: string;
632
+ shipping?: Currency;
633
+ tax?: Currency;
634
+ transaction_id?: string;
635
+ value?: number;
636
+ event_label?: string;
637
+ event_category?: string;
638
+ shipping_tier?: string;
639
+ item_list_id?: string;
640
+ item_list_name?: string;
641
+ promotion_id?: string;
642
+ promotion_name?: string;
643
+ payment_type?: string;
644
+ affiliation?: string;
645
+ page_title?: string;
646
+ page_location?: string;
647
+ page_path?: string;
648
+ [key: string]: unknown;
649
+ }
650
+ /**
651
+ * Unsupported in "Enhanced Ecommerce reports":
652
+ * https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-view_search_results
653
+ */
654
+ export interface Statics {
655
+ SDK_VERSION: string;
656
+ }
657
+ /**
658
+ * Analytics instance initialization options. Web only.
659
+ */
660
+ export interface AnalyticsSettings {
661
+ config?: GtagConfigParams | EventParams;
662
+ }
663
+ /**
664
+ * Additional options that can be passed to Analytics method calls such as logEvent. Web only.
665
+ */
666
+ export interface AnalyticsCallOptions {
667
+ /**
668
+ * If true, this config or event call applies globally to all Google Analytics properties on the page. Web only.
669
+ */
670
+ global: boolean;
671
+ }
672
+ /**
673
+ * A set of common Google Analytics config settings recognized by gtag.js. Web only.
674
+ */
675
+ export interface GtagConfigParams {
676
+ /**
677
+ * Whether or not a page view should be sent.
678
+ * If set to true (default), a page view is automatically sent upon initialization
679
+ * of analytics.
680
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
681
+ */
682
+ send_page_view?: boolean;
683
+ /**
684
+ * The title of the page.
685
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
686
+ */
687
+ page_title?: string;
688
+ /**
689
+ * The URL of the page.
690
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/page-view | Page views }
691
+ */
692
+ page_location?: string;
693
+ /**
694
+ * Defaults to `auto`.
695
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
696
+ */
697
+ cookie_domain?: string;
698
+ /**
699
+ * Defaults to 63072000 (two years, in seconds).
700
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
701
+ */
702
+ cookie_expires?: number;
703
+ /**
704
+ * Defaults to `_ga`.
705
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
706
+ */
707
+ cookie_prefix?: string;
708
+ /**
709
+ * If set to true, will update cookies on each page load.
710
+ * Defaults to true.
711
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
712
+ */
713
+ cookie_update?: boolean;
714
+ /**
715
+ * Appends additional flags to the cookie when set.
716
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/cookies-user-id | Cookies and user identification }
717
+ */
718
+ cookie_flags?: string;
719
+ /**
720
+ * If set to false, disables all advertising features with `gtag.js`.
721
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
722
+ */
723
+ allow_google_signals?: boolean;
724
+ /**
725
+ * If set to false, disables all advertising personalization with `gtag.js`.
726
+ * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
727
+ */
728
+ allow_ad_personalization_signals?: boolean;
729
+ [key: string]: unknown;
730
+ }
731
+ /**
732
+ * Consent status settings for each consent type.
733
+ * For more information, see
734
+ * {@link https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
735
+ * | the GA4 reference documentation for consent state and consent types}.
736
+ */
737
+ export interface ConsentSettings {
738
+ /** Enables storage, such as cookies, related to advertising */
739
+ ad_storage?: boolean;
740
+ /** Sets consent for sending user data to Google for online advertising purposes */
741
+ ad_user_data?: boolean;
742
+ /** Sets consent for personalized advertising */
743
+ ad_personalization?: boolean;
744
+ /** Enables storage, such as cookies, related to analytics (for example, visit duration) */
745
+ analytics_storage?: boolean;
746
+ /**
747
+ * Enables storage that supports the functionality of the website or app such as language settings
748
+ */
749
+ functionality_storage?: boolean;
750
+ /** Enables storage related to personalization such as video recommendations */
751
+ personalization_storage?: boolean;
752
+ /**
753
+ * Enables storage related to security such as authentication functionality, fraud prevention,
754
+ * and other user protection.
755
+ */
756
+ security_storage?: ConsentStatusString;
757
+ [key: string]: unknown;
758
+ }
759
+ /**
760
+ * Specifies custom options for your Firebase Analytics instance.
761
+ * You must set these before initializing `firebase.analytics()`.
762
+ */
763
+ export interface SettingsOptions {
764
+ /** Sets custom name for `gtag` function. */
765
+ gtagName?: string;
766
+ /** Sets custom name for `dataLayer` array used by `gtag.js`. */
767
+ dataLayerName?: string;
768
+ }
769
+ /**
770
+ * Any custom event name string not in the standard list of recommended event names.
771
+ */
772
+ export declare type CustomEventName<T> = T extends EventNameString ? never : T;
773
+ /**
774
+ * Type for standard Google Analytics event names. logEvent also accepts any custom string and interprets it as a custom event name.
775
+ * See https://firebase.google.com/docs/reference/js/analytics.md#eventnamestring
776
+ */
777
+ export declare type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results';
778
+ /**
779
+ * Analytics module instance - returned from firebase.analytics() or firebase.app().analytics()
780
+ */
781
+ export interface Analytics extends ReactNativeFirebase.FirebaseModule {
782
+ /** The FirebaseApp this module is associated with */
783
+ app: ReactNativeFirebase.FirebaseApp;
784
+ logEvent(name: string, params?: {
785
+ [key: string]: any;
786
+ }, options?: AnalyticsCallOptions): Promise<void>;
787
+ setAnalyticsCollectionEnabled(enabled: boolean): Promise<void>;
788
+ setSessionTimeoutDuration(milliseconds?: number): Promise<void>;
789
+ getAppInstanceId(): Promise<string | null>;
790
+ getSessionId(): Promise<number | null>;
791
+ setUserId(id: string | null): Promise<void>;
792
+ setUserProperty(name: string, value: string | null): Promise<void>;
793
+ setUserProperties(properties: {
794
+ [key: string]: string | null;
795
+ }, options?: AnalyticsCallOptions): Promise<void>;
796
+ resetAnalyticsData(): Promise<void>;
797
+ setConsent(consentSettings: ConsentSettings): Promise<void>;
798
+ setDefaultEventParameters(params?: {
799
+ [key: string]: any;
800
+ }): Promise<void>;
801
+ logAddPaymentInfo(object: AddPaymentInfoEventParameters): Promise<void>;
802
+ logScreenView(object: ScreenViewParameters): Promise<void>;
803
+ logAddShippingInfo(object?: AddShippingInfoParameters): Promise<void>;
804
+ logAddToCart(object?: AddToCartEventParameters): Promise<void>;
805
+ logAddToWishlist(object?: AddToWishlistEventParameters): Promise<void>;
806
+ logAppOpen(): Promise<void>;
807
+ logBeginCheckout(object?: BeginCheckoutEventParameters): Promise<void>;
808
+ logCampaignDetails(object: CampaignDetailsEventParameters): Promise<void>;
809
+ logEarnVirtualCurrency(object: EarnVirtualCurrencyEventParameters): Promise<void>;
810
+ logGenerateLead(object?: GenerateLeadEventParameters): Promise<void>;
811
+ logJoinGroup(object: JoinGroupEventParameters): Promise<void>;
812
+ logLevelEnd(object: LevelEndEventParameters): Promise<void>;
813
+ logLevelStart(object: LevelStartEventParameters): Promise<void>;
814
+ logLevelUp(object: LevelUpEventParameters): Promise<void>;
815
+ logLogin(object: LoginEventParameters): Promise<void>;
816
+ logPostScore(object: PostScoreEventParameters): Promise<void>;
817
+ logSelectContent(object: SelectContentEventParameters): Promise<void>;
818
+ logPurchase(object?: PurchaseEventParameters): Promise<void>;
819
+ logRefund(object?: RefundEventParameters): Promise<void>;
820
+ logRemoveFromCart(object?: RemoveFromCartEventParameters): Promise<void>;
821
+ logSearch(object: SearchEventParameters): Promise<void>;
822
+ logSelectItem(object: SelectItemEventParameters): Promise<void>;
823
+ logSetCheckoutOption(object: SetCheckoutOptionEventParameters): Promise<void>;
824
+ logSelectPromotion(object: SelectPromotionEventParameters): Promise<void>;
825
+ logShare(object: ShareEventParameters): Promise<void>;
826
+ logSignUp(object: SignUpEventParameters): Promise<void>;
827
+ logSpendVirtualCurrency(object: SpendVirtualCurrencyEventParameters): Promise<void>;
828
+ logTutorialBegin(): Promise<void>;
829
+ logTutorialComplete(): Promise<void>;
830
+ logUnlockAchievement(object: UnlockAchievementEventParameters): Promise<void>;
831
+ logViewCart(object?: ViewCartEventParameters): Promise<void>;
832
+ logViewItem(object?: ViewItemEventParameters): Promise<void>;
833
+ logViewItemList(object?: ViewItemListEventParameters): Promise<void>;
834
+ logViewPromotion(object?: ViewPromotionEventParameters): Promise<void>;
835
+ logViewSearchResults(object: ViewSearchResultsParameters): Promise<void>;
836
+ initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress: string): Promise<void>;
837
+ initiateOnDeviceConversionMeasurementWithHashedEmailAddress(hashedEmailAddress: string): Promise<void>;
838
+ initiateOnDeviceConversionMeasurementWithPhoneNumber(phoneNumber: string): Promise<void>;
839
+ initiateOnDeviceConversionMeasurementWithHashedPhoneNumber(hashedPhoneNumber: string): Promise<void>;
840
+ }
841
+ declare module '@react-native-firebase/app' {
842
+ namespace ReactNativeFirebase {
843
+ interface Module {
844
+ analytics: FirebaseModuleWithStaticsAndApp<Analytics, Statics>;
845
+ }
846
+ interface FirebaseApp {
847
+ analytics(): Analytics;
848
+ }
849
+ }
850
+ }
851
+ type _Item = Item;
852
+ type _AddPaymentInfoEventParameters = AddPaymentInfoEventParameters;
853
+ type _AddShippingInfoEventParameters = AddShippingInfoEventParameters;
854
+ type _AddToCartEventParameters = AddToCartEventParameters;
855
+ type _AddToWishlistEventParameters = AddToWishlistEventParameters;
856
+ type _BeginCheckoutEventParameters = BeginCheckoutEventParameters;
857
+ type _CampaignDetailsEventParameters = CampaignDetailsEventParameters;
858
+ type _EarnVirtualCurrencyEventParameters = EarnVirtualCurrencyEventParameters;
859
+ type _GenerateLeadEventParameters = GenerateLeadEventParameters;
860
+ type _JoinGroupEventParameters = JoinGroupEventParameters;
861
+ type _LevelEndEventParameters = LevelEndEventParameters;
862
+ type _LevelStartEventParameters = LevelStartEventParameters;
863
+ type _LevelUpEventParameters = LevelUpEventParameters;
864
+ type _LoginEventParameters = LoginEventParameters;
865
+ type _PostScoreEventParameters = PostScoreEventParameters;
866
+ type _PurchaseEventParameters = PurchaseEventParameters;
867
+ type _ScreenViewParameters = ScreenViewParameters;
868
+ type _RefundEventParameters = RefundEventParameters;
869
+ type _RemoveFromCartEventParameters = RemoveFromCartEventParameters;
870
+ type _SearchEventParameters = SearchEventParameters;
871
+ type _SelectContentEventParameters = SelectContentEventParameters;
872
+ type _SelectItemEventParameters = SelectItemEventParameters;
873
+ type _SetCheckoutOptionEventParameters = SetCheckoutOptionEventParameters;
874
+ type _SelectPromotionEventParameters = SelectPromotionEventParameters;
875
+ type _ShareEventParameters = ShareEventParameters;
876
+ type _SignUpEventParameters = SignUpEventParameters;
877
+ type _SpendVirtualCurrencyEventParameters = SpendVirtualCurrencyEventParameters;
878
+ type _UnlockAchievementEventParameters = UnlockAchievementEventParameters;
879
+ type _ViewCartEventParameters = ViewCartEventParameters;
880
+ type _ViewItemEventParameters = ViewItemEventParameters;
881
+ type _ViewSearchResultsParameters = ViewSearchResultsParameters;
882
+ type _ViewItemListEventParameters = ViewItemListEventParameters;
883
+ type _ViewPromotionEventParameters = ViewPromotionEventParameters;
884
+ type _AddShippingInfoParameters = AddShippingInfoParameters;
885
+ type _AnalyticsSettings = AnalyticsSettings;
886
+ type _AnalyticsCallOptions = AnalyticsCallOptions;
887
+ type _GtagConfigParams = GtagConfigParams;
888
+ type _ConsentSettings = ConsentSettings;
889
+ type _SettingsOptions = SettingsOptions;
890
+ type _EventParams = EventParams;
891
+ type _Statics = Statics;
892
+ /**
893
+ * @deprecated Use the exported types directly instead.
894
+ * FirebaseAnalyticsTypes namespace is kept for backwards compatibility.
895
+ */
896
+ export declare namespace FirebaseAnalyticsTypes {
897
+ type Module = Analytics;
898
+ type CallOptions = AnalyticsCallOptions;
899
+ type Consent = ConsentSettings;
900
+ type Settings = AnalyticsSettings;
901
+ type Statics = _Statics;
902
+ type Item = _Item;
903
+ type AddPaymentInfoEventParameters = _AddPaymentInfoEventParameters;
904
+ type AddShippingInfoEventParameters = _AddShippingInfoEventParameters;
905
+ type AddToCartEventParameters = _AddToCartEventParameters;
906
+ type AddToWishlistEventParameters = _AddToWishlistEventParameters;
907
+ type BeginCheckoutEventParameters = _BeginCheckoutEventParameters;
908
+ type CampaignDetailsEventParameters = _CampaignDetailsEventParameters;
909
+ type EarnVirtualCurrencyEventParameters = _EarnVirtualCurrencyEventParameters;
910
+ type GenerateLeadEventParameters = _GenerateLeadEventParameters;
911
+ type JoinGroupEventParameters = _JoinGroupEventParameters;
912
+ type LevelEndEventParameters = _LevelEndEventParameters;
913
+ type LevelStartEventParameters = _LevelStartEventParameters;
914
+ type LevelUpEventParameters = _LevelUpEventParameters;
915
+ type LoginEventParameters = _LoginEventParameters;
916
+ type PostScoreEventParameters = _PostScoreEventParameters;
917
+ type PurchaseEventParameters = _PurchaseEventParameters;
918
+ type ScreenViewParameters = _ScreenViewParameters;
919
+ type RefundEventParameters = _RefundEventParameters;
920
+ type RemoveFromCartEventParameters = _RemoveFromCartEventParameters;
921
+ type SearchEventParameters = _SearchEventParameters;
922
+ type SelectContentEventParameters = _SelectContentEventParameters;
923
+ type SelectItemEventParameters = _SelectItemEventParameters;
924
+ type SetCheckoutOptionEventParameters = _SetCheckoutOptionEventParameters;
925
+ type SelectPromotionEventParameters = _SelectPromotionEventParameters;
926
+ type ShareEventParameters = _ShareEventParameters;
927
+ type SignUpEventParameters = _SignUpEventParameters;
928
+ type SpendVirtualCurrencyEventParameters = _SpendVirtualCurrencyEventParameters;
929
+ type UnlockAchievementEventParameters = _UnlockAchievementEventParameters;
930
+ type ViewCartEventParameters = _ViewCartEventParameters;
931
+ type ViewItemEventParameters = _ViewItemEventParameters;
932
+ type ViewSearchResultsParameters = _ViewSearchResultsParameters;
933
+ type ViewItemListEventParameters = _ViewItemListEventParameters;
934
+ type ViewPromotionEventParameters = _ViewPromotionEventParameters;
935
+ type AddShippingInfoParameters = _AddShippingInfoParameters;
936
+ type AnalyticsSettings = _AnalyticsSettings;
937
+ type AnalyticsCallOptions = _AnalyticsCallOptions;
938
+ type GtagConfigParams = _GtagConfigParams;
939
+ type ConsentSettings = _ConsentSettings;
940
+ type SettingsOptions = _SettingsOptions;
941
+ type EventParams = _EventParams;
942
+ }
943
+ export {};
944
+ //# sourceMappingURL=analytics.d.ts.map