@react-native-firebase/analytics 18.3.2 → 18.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,14 @@
1
1
  import { firebase } from '..';
2
2
 
3
+ /**
4
+ * @typedef {import("..").FirebaseApp} FirebaseApp
5
+ * @typedef {import("..").FirebaseAnalyticsTypes.Module} FirebaseAnalytics
6
+ */
7
+
3
8
  /**
4
9
  * Returns a Analytics instance for the given app.
5
10
  * @param app - FirebaseApp. Optional.
6
- * @returns {Analytics}
11
+ * @returns {FirebaseAnalytics}
7
12
  */
8
13
  export function getAnalytics(app) {
9
14
  if (app) {
@@ -17,7 +22,7 @@ export function getAnalytics(app) {
17
22
  * Returns a Analytics instance for the given app.
18
23
  * @param app - FirebaseApp.
19
24
  * @param options - `AnalyticsSettings`. Web only.
20
- * @returns {Analytics}
25
+ * @returns {FirebaseAnalytics}
21
26
  */
22
27
  // eslint-disable-next-line
23
28
  export function initializeAnalytics(app, options) {
@@ -52,6 +57,7 @@ export function logEvent(analytics, name, eventParams = {}, options = {}) {
52
57
  export function setAnalyticsCollectionEnabled(analytics, enabled) {
53
58
  return analytics.setAnalyticsCollectionEnabled(enabled);
54
59
  }
60
+
55
61
  /**
56
62
  * Sets the duration of inactivity that terminates the current session.
57
63
  *
@@ -61,6 +67,7 @@ export function setAnalyticsCollectionEnabled(analytics, enabled) {
61
67
  export function setSessionTimeoutDuration(analytics, milliseconds = 1800000) {
62
68
  return analytics.setSessionTimeoutDuration(milliseconds);
63
69
  }
70
+
64
71
  /**
65
72
  * Retrieve the app instance id of the application.
66
73
  *
@@ -70,6 +77,7 @@ export function setSessionTimeoutDuration(analytics, milliseconds = 1800000) {
70
77
  export function getAppInstanceId(analytics) {
71
78
  return analytics.getAppInstanceId();
72
79
  }
80
+
73
81
  /**
74
82
  * Retrieves the session id from the client.
75
83
  * 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.
@@ -90,6 +98,7 @@ export function getSessionId(analytics) {
90
98
  export function setUserId(analytics, id) {
91
99
  return analytics.setUserId(id);
92
100
  }
101
+
93
102
  /**
94
103
  * 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.
95
104
  *
@@ -100,6 +109,7 @@ export function setUserId(analytics, id) {
100
109
  export function setUserProperty(analytics, name, value) {
101
110
  return analytics.setUserProperty(name, value);
102
111
  }
112
+
103
113
  /**
104
114
  * 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.
105
115
  *
@@ -112,6 +122,7 @@ export function setUserProperty(analytics, name, value) {
112
122
  export function setUserProperties(analytics, properties, options = {}) {
113
123
  return analytics.setUserProperties(properties, options);
114
124
  }
125
+
115
126
  /**
116
127
  * Clears all analytics data for this instance from the device and resets the app instance ID.
117
128
  *
@@ -120,6 +131,7 @@ export function setUserProperties(analytics, properties, options = {}) {
120
131
  export function resetAnalyticsData(analytics) {
121
132
  return analytics.resetAnalyticsData();
122
133
  }
134
+
123
135
  /**
124
136
  * 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
125
137
  * automatically for Google Play-based apps.
@@ -134,6 +146,7 @@ export function resetAnalyticsData(analytics) {
134
146
  export function logAddPaymentInfo(analytics, object = {}) {
135
147
  return analytics.logAddPaymentInfo(object);
136
148
  }
149
+
137
150
  /**
138
151
  * Sets or clears the screen name and class the user is currently viewing
139
152
  *
@@ -143,6 +156,7 @@ export function logAddPaymentInfo(analytics, object = {}) {
143
156
  export function logScreenView(analytics, object = {}) {
144
157
  return analytics.logScreenView(object);
145
158
  }
159
+
146
160
  /**
147
161
  * Add Payment Info event. This event signifies that a user has submitted their payment information to your app.
148
162
  *
@@ -156,6 +170,7 @@ export function logScreenView(analytics, object = {}) {
156
170
  export function logAddShippingInfo(analytics, object = {}) {
157
171
  return analytics.logAddShippingInfo(object);
158
172
  }
173
+
159
174
  /**
160
175
  * E-Commerce Add To Cart event.
161
176
  *
@@ -169,6 +184,7 @@ export function logAddShippingInfo(analytics, object = {}) {
169
184
  export function logAddToCart(analytics, object = {}) {
170
185
  return analytics.logAddToCart(object);
171
186
  }
187
+
172
188
  /**
173
189
  * E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist.
174
190
  * Use this event to identify popular gift items in your app.
@@ -183,6 +199,7 @@ export function logAddToCart(analytics, object = {}) {
183
199
  export function logAddToWishlist(analytics, object = {}) {
184
200
  return analytics.logAddToWishlist(object);
185
201
  }
202
+
186
203
  /**
187
204
  * App Open event. By logging this event when an App is moved to the foreground, developers can
188
205
  * understand how often users leave and return during the course of a Session. Although Sessions
@@ -194,6 +211,7 @@ export function logAddToWishlist(analytics, object = {}) {
194
211
  export function logAppOpen(analytics) {
195
212
  return analytics.logAppOpen();
196
213
  }
214
+
197
215
  /**
198
216
  * E-Commerce Begin Checkout event. This event signifies that a user has begun the process of
199
217
  * checking out.
@@ -208,6 +226,7 @@ export function logAppOpen(analytics) {
208
226
  export function logBeginCheckout(analytics, object = {}) {
209
227
  return analytics.logBeginCheckout(object);
210
228
  }
229
+
211
230
  /**
212
231
  * Log this event to supply the referral details of a re-engagement campaign.
213
232
  *
@@ -219,6 +238,7 @@ export function logBeginCheckout(analytics, object = {}) {
219
238
  export function logCampaignDetails(analytics, object = {}) {
220
239
  return analytics.logCampaignDetails(object);
221
240
  }
241
+
222
242
  /**
223
243
  * Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log this along with
224
244
  * {@link analytics.logSpendVirtualCurrency} to better understand your virtual economy.
@@ -231,6 +251,7 @@ export function logCampaignDetails(analytics, object = {}) {
231
251
  export function logEarnVirtualCurrency(analytics, object = {}) {
232
252
  return analytics.logEarnVirtualCurrency(object);
233
253
  }
254
+
234
255
  /**
235
256
  * Generate Lead event. Log this event when a lead has been generated in the app to understand
236
257
  * the efficacy of your install and re-engagement campaigns.
@@ -245,6 +266,7 @@ export function logEarnVirtualCurrency(analytics, object = {}) {
245
266
  export function logGenerateLead(analytics, object = {}) {
246
267
  return analytics.logGenerateLead(object);
247
268
  }
269
+
248
270
  /**
249
271
  * Join Group event. Log this event when a user joins a group such as a guild, team or family.
250
272
  * Use this event to analyze how popular certain groups or social features are in your app
@@ -257,6 +279,7 @@ export function logGenerateLead(analytics, object = {}) {
257
279
  export function logJoinGroup(analytics, object = {}) {
258
280
  return analytics.logJoinGroup(object);
259
281
  }
282
+
260
283
  /**
261
284
  * Level End event.
262
285
  *
@@ -268,6 +291,7 @@ export function logJoinGroup(analytics, object = {}) {
268
291
  export function logLevelEnd(analytics, object = {}) {
269
292
  return analytics.logLevelEnd(object);
270
293
  }
294
+
271
295
  /**
272
296
  * Level Start event.
273
297
  *
@@ -279,6 +303,7 @@ export function logLevelEnd(analytics, object = {}) {
279
303
  export function logLevelStart(analytics, object = {}) {
280
304
  return analytics.logLevelStart(object);
281
305
  }
306
+
282
307
  /**
283
308
  * Level Up event. This event signifies that a player has leveled up in your gaming app.
284
309
  * It can help you gauge the level distribution of your userbase and help you identify certain levels that are difficult to pass.
@@ -291,6 +316,7 @@ export function logLevelStart(analytics, object = {}) {
291
316
  export function logLevelUp(analytics, object = {}) {
292
317
  return analytics.logLevelUp(object);
293
318
  }
319
+
294
320
  /**
295
321
  * Login event. Apps with a login feature can report this event to signify that a user has logged in.
296
322
  *
@@ -302,6 +328,7 @@ export function logLevelUp(analytics, object = {}) {
302
328
  export function logLogin(analytics, object = {}) {
303
329
  return analytics.logLogin(object);
304
330
  }
331
+
305
332
  /**
306
333
  * Post Score event. Log this event when the user posts a score in your gaming app. This event can
307
334
  * help you understand how users are actually performing in your game and it can help you correlate
@@ -315,6 +342,7 @@ export function logLogin(analytics, object = {}) {
315
342
  export function logPostScore(analytics, object = {}) {
316
343
  return analytics.logPostScore(object);
317
344
  }
345
+
318
346
  /**
319
347
  * Select Content event. This general purpose event signifies that a user has selected some
320
348
  * content of a certain type in an app. The content can be any object in your app. This event
@@ -328,6 +356,7 @@ export function logPostScore(analytics, object = {}) {
328
356
  export function logSelectContent(analytics, object = {}) {
329
357
  return analytics.logSelectContent(object);
330
358
  }
359
+
331
360
  /**
332
361
  * 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
333
362
  * automatically for Google Play-based apps.
@@ -342,6 +371,7 @@ export function logSelectContent(analytics, object = {}) {
342
371
  export function logPurchase(analytics, object = {}) {
343
372
  return analytics.logPurchase(object);
344
373
  }
374
+
345
375
  /**
346
376
  * E-Commerce Refund event. This event signifies that a refund was issued.
347
377
  *
@@ -353,6 +383,7 @@ export function logPurchase(analytics, object = {}) {
353
383
  export function logRefund(analytics, object = {}) {
354
384
  return analytics.logRefund(object);
355
385
  }
386
+
356
387
  /**
357
388
  * Remove from cart event.
358
389
  *
@@ -364,6 +395,7 @@ export function logRefund(analytics, object = {}) {
364
395
  export function logRemoveFromCart(analytics, object = {}) {
365
396
  return analytics.logRemoveFromCart(object);
366
397
  }
398
+
367
399
  /**
368
400
  * Search event. Apps that support search features can use this event to contextualize search
369
401
  * operations by supplying the appropriate, corresponding parameters. This event can help you
@@ -377,6 +409,7 @@ export function logRemoveFromCart(analytics, object = {}) {
377
409
  export function logSearch(analytics, object = {}) {
378
410
  return analytics.logSearch(object);
379
411
  }
412
+
380
413
  /**
381
414
  * Select Item event. This event signifies that an item was selected by a user from a list.
382
415
  * Use the appropriate parameters to contextualize the event.
@@ -390,6 +423,7 @@ export function logSearch(analytics, object = {}) {
390
423
  export function logSelectItem(analytics, object = {}) {
391
424
  return analytics.logSelectItem(object);
392
425
  }
426
+
393
427
  /**
394
428
  * Set checkout option event.
395
429
  *
@@ -401,6 +435,7 @@ export function logSelectItem(analytics, object = {}) {
401
435
  export function logSetCheckoutOption(analytics, object = {}) {
402
436
  return analytics.logSetCheckoutOption(object);
403
437
  }
438
+
404
439
  /**
405
440
  * Select promotion event. This event signifies that a user has selected a promotion offer. Use the
406
441
  * appropriate parameters to contextualize the event, such as the item(s) for which the promotion applies.
@@ -413,6 +448,7 @@ export function logSetCheckoutOption(analytics, object = {}) {
413
448
  export function logSelectPromotion(analytics, object = {}) {
414
449
  return analytics.logSelectPromotion(object);
415
450
  }
451
+
416
452
  /**
417
453
  * Share event. Apps with social features can log the Share event to identify the most viral content.
418
454
  *
@@ -424,6 +460,7 @@ export function logSelectPromotion(analytics, object = {}) {
424
460
  export function logShare(analytics, object = {}) {
425
461
  return analytics.logShare(object);
426
462
  }
463
+
427
464
  /**
428
465
  * Sign Up event. This event indicates that a user has signed up for an account in your app.
429
466
  * The parameter signifies the method by which the user signed up. Use this event to understand
@@ -437,6 +474,7 @@ export function logShare(analytics, object = {}) {
437
474
  export function logSignUp(analytics, object = {}) {
438
475
  return analytics.logSignUp(object);
439
476
  }
477
+
440
478
  /**
441
479
  * Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can
442
480
  * help you identify which virtual goods are the most popular objects of purchase.
@@ -449,6 +487,7 @@ export function logSignUp(analytics, object = {}) {
449
487
  export function logSpendVirtualCurrency(analytics, object = {}) {
450
488
  return analytics.logSpendVirtualCurrency(object);
451
489
  }
490
+
452
491
  /**
453
492
  * Tutorial Begin event. This event signifies the start of the on-boarding process in your app.
454
493
  * Use this in a funnel with {@link analytics#logTutorialComplete} to understand how many users
@@ -461,6 +500,7 @@ export function logSpendVirtualCurrency(analytics, object = {}) {
461
500
  export function logTutorialBegin(analytics) {
462
501
  return analytics.logTutorialBegin();
463
502
  }
503
+
464
504
  /**
465
505
  * Tutorial End event. Use this event to signify the user's completion of your app's on-boarding process.
466
506
  * Add this to a funnel with {@link analytics#logTutorialBegin} to understand how many users
@@ -473,6 +513,7 @@ export function logTutorialBegin(analytics) {
473
513
  export function logTutorialComplete(analytics) {
474
514
  return analytics.logTutorialComplete();
475
515
  }
516
+
476
517
  /**
477
518
  * Unlock Achievement event. Log this event when the user has unlocked an achievement in your game.
478
519
  * Since achievements generally represent the breadth of a gaming experience, this event can help
@@ -486,6 +527,7 @@ export function logTutorialComplete(analytics) {
486
527
  export function logUnlockAchievement(analytics, object = {}) {
487
528
  return analytics.logUnlockAchievement(object);
488
529
  }
530
+
489
531
  /**
490
532
  * E-commerce View Cart event. This event signifies that a user has viewed their cart. Use this to analyze your purchase funnel.
491
533
  *
@@ -499,6 +541,7 @@ export function logUnlockAchievement(analytics, object = {}) {
499
541
  export function logViewCart(analytics, object = {}) {
500
542
  return analytics.logViewCart(object);
501
543
  }
544
+
502
545
  /**
503
546
  * View Item event. This event signifies that some content was shown to the user. This content
504
547
  * may be a product, a screen or just a simple image or text. Use the appropriate parameters
@@ -514,6 +557,7 @@ export function logViewCart(analytics, object = {}) {
514
557
  export function logViewItem(analytics, object = {}) {
515
558
  return analytics.logViewItem(object);
516
559
  }
560
+
517
561
  /**
518
562
  * View Item List event. Log this event when the user has been presented with a list of items of a certain category.
519
563
  *
@@ -526,9 +570,18 @@ export function logViewItemList(analytics, object = {}) {
526
570
  return analytics.logViewItemList(object);
527
571
  }
528
572
 
573
+ /**
574
+ * View Promotion event. This event signifies that a promotion was shown to a user.
575
+ *
576
+ * Logged event name: `view_promotion`
577
+ *
578
+ * @param analytics Analytics instance.
579
+ * @param params See {@link analytics.ViewPromotionEventParameters}.
580
+ */
529
581
  export function logViewPromotion(analytics, object = {}) {
530
582
  return analytics.logViewPromotion(object);
531
583
  }
584
+
532
585
  /**
533
586
  * View Search Results event. Log this event when the user has been presented with the results of a search.
534
587
  *
@@ -540,6 +593,7 @@ export function logViewPromotion(analytics, object = {}) {
540
593
  export function logViewSearchResults(analytics, object = {}) {
541
594
  return analytics.logViewSearchResults(object);
542
595
  }
596
+
543
597
  /**
544
598
  * Adds parameters that will be set on every event logged from the SDK, including automatic ones.
545
599
  *
@@ -555,6 +609,7 @@ export function logViewSearchResults(analytics, object = {}) {
555
609
  export function setDefaultEventParameters(analytics, params = {}) {
556
610
  return analytics.setDefaultEventParameters(params);
557
611
  }
612
+
558
613
  /**
559
614
  * start privacy-sensitive on-device conversion management.
560
615
  * This is iOS-only.
@@ -579,6 +634,7 @@ export function isSupported() {
579
634
  // always return "true" for now until Web implementation. Web only.
580
635
  return Promise.resolve(true);
581
636
  }
637
+
582
638
  /**
583
639
  * Sets the applicable end user consent state for this web app across all gtag
584
640
  * references once Firebase Analytics is initialized. Web only.
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '18.3.2';
2
+ module.exports = '18.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/analytics",
3
- "version": "18.3.2",
3
+ "version": "18.4.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
6
6
  "main": "lib/index.js",
@@ -22,10 +22,10 @@
22
22
  "analytics"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@react-native-firebase/app": "18.3.2"
25
+ "@react-native-firebase/app": "18.4.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "f323891622441c9d59a25ef37b19534db512b372"
30
+ "gitHead": "5f6460a87970d8b6013530de980bc760ddc70f90"
31
31
  }