Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-firebase/analytics

Package Overview
Dependencies
Maintainers
4
Versions
269
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-firebase/analytics

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 mo

  • 18.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
339K
increased by4.49%
Maintainers
4
Weekly downloads
 
Created

What is @react-native-firebase/analytics?

@react-native-firebase/analytics is a module for integrating Firebase Analytics into React Native applications. It allows developers to log events, set user properties, and track user interactions within their app, providing valuable insights for improving user experience and app performance.

What are @react-native-firebase/analytics's main functionalities?

Log Events

This feature allows you to log custom events to Firebase Analytics. The example logs an event when a product is viewed, including details like product ID, name, description, and price.

import analytics from '@react-native-firebase/analytics';

// Log a custom event
analytics().logEvent('product_view', {
  id: '123456',
  item: 'Product Name',
  description: 'Product Description',
  price: 29.99
});

Set User Properties

This feature allows you to set user properties that can be used to segment your audience in Firebase Analytics. The example sets a user property indicating the user's favorite food.

import analytics from '@react-native-firebase/analytics';

// Set a user property
analytics().setUserProperty('favorite_food', 'pizza');

Track Screen Views

This feature allows you to log screen views, which helps in understanding how users navigate through your app. The example logs a screen view for the 'HomeScreen'.

import analytics from '@react-native-firebase/analytics';

// Track a screen view
analytics().logScreenView({
  screen_name: 'HomeScreen',
  screen_class: 'HomeScreenClass'
});

Set User ID

This feature allows you to set a unique identifier for a user, which can be used to track user behavior across different devices and sessions. The example sets a user ID to 'user123'.

import analytics from '@react-native-firebase/analytics';

// Set a user ID
analytics().setUserId('user123');

Other packages similar to @react-native-firebase/analytics

Keywords

FAQs

Package last updated on 19 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc