@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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [18.4.0](https://github.com/invertase/react-native-firebase/compare/v18.3.2...v18.4.0) (2023-09-11)
7
+
8
+ ### Features
9
+
10
+ - **analytics:** Add types to modular package ([#7109](https://github.com/invertase/react-native-firebase/issues/7109)) ([b6f64bf](https://github.com/invertase/react-native-firebase/commit/b6f64bf8813ceedd220d3e16eec850e4cbc9d53b))
11
+
6
12
  ## [18.3.2](https://github.com/invertase/react-native-firebase/compare/v18.3.1...v18.3.2) (2023-09-02)
7
13
 
8
14
  **Note:** Version bump only for package @react-native-firebase/analytics
package/lib/index.d.ts CHANGED
@@ -229,6 +229,7 @@ export namespace FirebaseAnalyticsTypes {
229
229
  */
230
230
  value: number;
231
231
  }
232
+
232
233
  export interface GenerateLeadEventParameters {
233
234
  /**
234
235
  * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
@@ -344,6 +345,7 @@ export namespace FirebaseAnalyticsTypes {
344
345
  * Current class associated with the view the user is currently viewing.
345
346
  */
346
347
  screen_class?: string;
348
+
347
349
  /**
348
350
  * Custom event parameters.
349
351
  */
@@ -395,7 +397,7 @@ export namespace FirebaseAnalyticsTypes {
395
397
  value?: number;
396
398
  /**
397
399
  * Purchase currency in 3 letter [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. E.g. `USD`.
398
- x */
400
+ x */
399
401
  currency?: string;
400
402
  }
401
403
 
@@ -456,6 +458,13 @@ export namespace FirebaseAnalyticsTypes {
456
458
  item_list_name: string;
457
459
  }
458
460
 
461
+ export interface SetCheckoutOptionEventParameters {
462
+ checkout_step?: EventParams['checkout_step'];
463
+ checkout_option?: EventParams['checkout_option'];
464
+
465
+ [key: string]: any;
466
+ }
467
+
459
468
  export interface SelectPromotionEventParameters {
460
469
  /**
461
470
  * The name of a creative used in a promotional spot
@@ -518,6 +527,7 @@ export namespace FirebaseAnalyticsTypes {
518
527
  */
519
528
  value: number;
520
529
  }
530
+
521
531
  export interface UnlockAchievementEventParameters {
522
532
  /**
523
533
  * Game achievement ID (String).
@@ -617,6 +627,7 @@ export namespace FirebaseAnalyticsTypes {
617
627
  */
618
628
  shipping_tier?: string;
619
629
  }
630
+
620
631
  /**
621
632
  * Unsupported in "Enhanced Ecommerce reports":
622
633
  * https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-view_search_results
@@ -630,12 +641,14 @@ export namespace FirebaseAnalyticsTypes {
630
641
 
631
642
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
632
643
  export interface Statics {}
644
+
633
645
  /**
634
646
  * Analytics instance initialization options. Web only.
635
647
  */
636
648
  export interface AnalyticsSettings {
637
649
  config?: GtagConfigParams | EventParams;
638
650
  }
651
+
639
652
  /**
640
653
  * Additional options that can be passed to Analytics method calls such as logEvent. Web only.
641
654
  */
@@ -645,6 +658,7 @@ export namespace FirebaseAnalyticsTypes {
645
658
  */
646
659
  global: boolean;
647
660
  }
661
+
648
662
  /**
649
663
  * A set of common Google Analytics config settings recognized by gtag.js. Web only.
650
664
  */
@@ -702,8 +716,10 @@ export namespace FirebaseAnalyticsTypes {
702
716
  * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
703
717
  */
704
718
  allow_ad_personalization_signals?: boolean;
719
+
705
720
  [key: string]: unknown;
706
721
  }
722
+
707
723
  /**
708
724
  * Standard gtag.js event parameters. For more information, see the GA4 reference documentation. Web only.
709
725
  */
@@ -746,6 +762,7 @@ export namespace FirebaseAnalyticsTypes {
746
762
  page_title?: string;
747
763
  page_location?: string;
748
764
  page_path?: string;
765
+
749
766
  [key: string]: unknown;
750
767
  }
751
768
 
@@ -771,6 +788,7 @@ export namespace FirebaseAnalyticsTypes {
771
788
  * and other user protection.
772
789
  */
773
790
  security_storage?: ConsentStatusString;
791
+
774
792
  [key: string]: unknown;
775
793
  }
776
794
 
@@ -947,6 +965,7 @@ export namespace FirebaseAnalyticsTypes {
947
965
  * ```
948
966
  */
949
967
  resetAnalyticsData(): Promise<void>;
968
+
950
969
  /**
951
970
  * 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
952
971
  * automatically for Google Play-based apps.
@@ -971,6 +990,7 @@ export namespace FirebaseAnalyticsTypes {
971
990
  * ```
972
991
  */
973
992
  logPurchase(params: PurchaseEventParameters): Promise<void>;
993
+
974
994
  /**
975
995
  * Sets or clears the screen name and class the user is currently viewing
976
996
  *
@@ -985,6 +1005,7 @@ export namespace FirebaseAnalyticsTypes {
985
1005
  *
986
1006
  */
987
1007
  logScreenView(params: ScreenViewParameters): Promise<void>;
1008
+
988
1009
  /**
989
1010
  * Add Payment Info event. This event signifies that a user has submitted their payment information to your app.
990
1011
  *
@@ -1150,6 +1171,7 @@ export namespace FirebaseAnalyticsTypes {
1150
1171
  * @param params See {@link analytics.CampaignDetailsEventParameters}.
1151
1172
  */
1152
1173
  logCampaignDetails(params: CampaignDetailsEventParameters): Promise<void>;
1174
+
1153
1175
  /**
1154
1176
  * View Promotion event. This event signifies that a promotion was shown to a user.
1155
1177
  *
@@ -1189,6 +1211,7 @@ export namespace FirebaseAnalyticsTypes {
1189
1211
  * @param params See {@link analytics.EarnVirtualCurrencyEventParameters}.
1190
1212
  */
1191
1213
  logEarnVirtualCurrency(params: EarnVirtualCurrencyEventParameters): Promise<void>;
1214
+
1192
1215
  /**
1193
1216
  * Generate Lead event. Log this event when a lead has been generated in the app to understand
1194
1217
  * the efficacy of your install and re-engagement campaigns.
@@ -1319,6 +1342,7 @@ export namespace FirebaseAnalyticsTypes {
1319
1342
  * @param params See {@link analytics.PostScoreEventParameters}.
1320
1343
  */
1321
1344
  logPostScore(params: PostScoreEventParameters): Promise<void>;
1345
+
1322
1346
  /**
1323
1347
  * Remove from cart event.
1324
1348
  *
@@ -1342,6 +1366,7 @@ export namespace FirebaseAnalyticsTypes {
1342
1366
  * @param params See {@link analytics.RemoveFromCartEventParameters}.
1343
1367
  */
1344
1368
  logRemoveFromCart(params: RemoveFromCartEventParameters): Promise<void>;
1369
+
1345
1370
  /**
1346
1371
  * E-Commerce Refund event. This event signifies that a refund was issued.
1347
1372
  *
@@ -1384,6 +1409,7 @@ export namespace FirebaseAnalyticsTypes {
1384
1409
  * @param params See {@link analytics.SearchEventParameters}.
1385
1410
  */
1386
1411
  logSearch(params: SearchEventParameters): Promise<void>;
1412
+
1387
1413
  /**
1388
1414
  * Select Content event. This general purpose event signifies that a user has selected some
1389
1415
  * content of a certain type in an app. The content can be any object in your app. This event
@@ -1403,6 +1429,7 @@ export namespace FirebaseAnalyticsTypes {
1403
1429
  * @param params See {@link analytics.SelectContentEventParameters}.
1404
1430
  */
1405
1431
  logSelectContent(params: SelectContentEventParameters): Promise<void>;
1432
+
1406
1433
  /**
1407
1434
  * Select Item event. This event signifies that an item was selected by a user from a list.
1408
1435
  * Use the appropriate parameters to contextualize the event.
@@ -1428,6 +1455,7 @@ export namespace FirebaseAnalyticsTypes {
1428
1455
  * @param params See {@link analytics.SelectItemEventParameters}.
1429
1456
  */
1430
1457
  logSelectItem(params: SelectItemEventParameters): Promise<void>;
1458
+
1431
1459
  /**
1432
1460
  * Set checkout option event.
1433
1461
  *
@@ -1601,6 +1629,7 @@ export namespace FirebaseAnalyticsTypes {
1601
1629
  * @param params See {@link analytics.ViewItemEventParameters}.
1602
1630
  */
1603
1631
  logViewItem(params: ViewItemEventParameters): Promise<void>;
1632
+
1604
1633
  /**
1605
1634
  * E-commerce View Cart event. This event signifies that a user has viewed their cart. Use this to analyze your purchase funnel.
1606
1635
  *
@@ -1643,6 +1672,7 @@ export namespace FirebaseAnalyticsTypes {
1643
1672
  * @param params See {@link analytics.ViewItemListEventParameters}.
1644
1673
  */
1645
1674
  logViewItemList(params: ViewItemListEventParameters): Promise<void>;
1675
+
1646
1676
  /**
1647
1677
  * View Search Results event. Log this event when the user has been presented with the results of a search.
1648
1678
  *
@@ -1689,6 +1719,43 @@ export namespace FirebaseAnalyticsTypes {
1689
1719
  */
1690
1720
  initiateOnDeviceConversionMeasurementWithEmailAddress(emailAddress: string): Promise<void>;
1691
1721
  }
1722
+
1723
+ /**
1724
+ * Any custom event name string not in the standard list of recommended event names.
1725
+ */
1726
+ export declare type CustomEventName<T> = T extends EventNameString ? never : T;
1727
+ /**
1728
+ * Type for standard Google Analytics event names. logEvent also accepts any custom string and interprets it as a custom event name.
1729
+ * See https://firebase.google.com/docs/reference/js/analytics.md#eventnamestring
1730
+ */
1731
+ export declare type EventNameString =
1732
+ | 'add_payment_info'
1733
+ | 'add_shipping_info'
1734
+ | 'add_to_cart'
1735
+ | 'add_to_wishlist'
1736
+ | 'begin_checkout'
1737
+ | 'checkout_progress'
1738
+ | 'exception'
1739
+ | 'generate_lead'
1740
+ | 'login'
1741
+ | 'page_view'
1742
+ | 'purchase'
1743
+ | 'refund'
1744
+ | 'remove_from_cart'
1745
+ | 'screen_view'
1746
+ | 'search'
1747
+ | 'select_content'
1748
+ | 'select_item'
1749
+ | 'select_promotion'
1750
+ | 'set_checkout_option'
1751
+ | 'share'
1752
+ | 'sign_up'
1753
+ | 'timing_complete'
1754
+ | 'view_cart'
1755
+ | 'view_item'
1756
+ | 'view_item_list'
1757
+ | 'view_promotion'
1758
+ | 'view_search_results';
1692
1759
  }
1693
1760
 
1694
1761
  declare const defaultExport: ReactNativeFirebase.FirebaseModuleWithStatics<
@@ -1703,6 +1770,8 @@ export const firebase: ReactNativeFirebase.Module & {
1703
1770
  ): ReactNativeFirebase.FirebaseApp & { analytics(): FirebaseAnalyticsTypes.Module };
1704
1771
  };
1705
1772
 
1773
+ export * from './modular';
1774
+
1706
1775
  export default defaultExport;
1707
1776
 
1708
1777
  /**
@@ -1712,6 +1781,7 @@ declare module '@react-native-firebase/app' {
1712
1781
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1713
1782
  namespace ReactNativeFirebase {
1714
1783
  import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
1784
+
1715
1785
  interface Module {
1716
1786
  analytics: FirebaseModuleWithStatics<
1717
1787
  FirebaseAnalyticsTypes.Module,
package/lib/index.js CHANGED
@@ -85,7 +85,7 @@ export {
85
85
  logViewSearchResults,
86
86
  setDefaultEventParameters,
87
87
  initiateOnDeviceConversionMeasurementWithEmailAddress,
88
- } from '../modular/index';
88
+ } from './modular/index';
89
89
 
90
90
  const ReservedEventNames = [
91
91
  'ad_activeview',