--- title: Analytics description: Installation and getting started with Analytics. icon: //static.invertase.io/assets/firebase/analytics.svg next: /analytics/screen-tracking previous: /admob/european-user-consent --- # Installation This module requires that the `@react-native-firebase/app` module is already setup and installed. To install the "app" module, view the [Getting Started](/) documentation. ```bash # Install & setup the app module yarn add @react-native-firebase/app # Install the analytics module yarn add @react-native-firebase/analytics # If you're developing your app using iOS, run this command cd ios/ && pod install ``` If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project, you can follow the manual installation steps for [iOS](/analytics/usage/installation/ios) and [Android](/analytics/usage/installation/android). # What does it do Analytics collects usage and behavior data for your app. Its two primary concerns are: - **Events**: What is happening in your app, such as user actions, system events, or errors. - **User properties**: Attributes you define to describe segments of your user base, such as language preference or geographic location. Analytics automatically logs some [events](https://support.google.com/analytics/answer/9234069) and [user properties](https://support.google.com/analytics/answer/9268042); you don't need to add any code to enable them. However, Analytics also allows you to log [custom](#Custom-Events) or [predefined](#Predefined-Events) events within your app. How you can do this will be explained below. # Usage Analytics offers a wealth of [Predefined Events](#Predefined-Events) to track user behavior. Analytics also offers folks the ability to log [Custom Events](#Custom-Events) . If you're already familiar with Google Analytics, this method is equivalent to using the event command in [gtag.js](https://developers.google.com/gtagjs/). ## Custom Events 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. ```jsx import react, { useEffect } from 'react'; import { View, Button } from 'react-native'; import analytics from '@react-native-firebase/analytics'; function App() { return (