From 45820833e8def2b361fab48597f56ea38c148474 Mon Sep 17 00:00:00 2001 From: Bilal Abdeen Date: Mon, 13 Apr 2026 08:59:49 +1000 Subject: [PATCH 1/6] docs(Analytics): Adding examples for v23 --- docs/analytics/usage/index.md | 107 ++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/docs/analytics/usage/index.md b/docs/analytics/usage/index.md index 6a7745bdf0..c7d845e042 100644 --- a/docs/analytics/usage/index.md +++ b/docs/analytics/usage/index.md @@ -55,6 +55,7 @@ Different event types require different parameters (some require no parameters, Below is an example showing how a custom event can be logged. Please be aware that primitive data types or arrays of primitive data types are logged in your Firebase Analytics console. +For React Native Firebase <= v21 ```jsx import react, { useEffect } from 'react'; import { View, Button } from 'react-native'; @@ -79,6 +80,33 @@ function App() { } ``` +For React Native Firebase >= v22 +```jsx +import react, { useEffect } from 'react'; +import { View, Button } from 'react-native'; +import { getAnalytics, logEvent } from '@react-native-firebase/analytics'; + +const analytics = getAnalytics(); + +function App() { + return ( + +