You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@firebase/analytics

Package Overview
Dependencies
Maintainers
4
Versions
2730
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/analytics

A analytics package for new firebase packages

0.10.18
latest
Source
npmnpm
Version published
Weekly downloads
2.4M
-16.86%
Maintainers
4
Weekly downloads
 
Created

What is @firebase/analytics?

The @firebase/analytics package is part of the Firebase platform and is used to integrate Google Analytics with web applications to track and analyze user interactions and behavior in a privacy-compliant manner. It provides insights into app usage patterns and effectiveness of different features, helping developers to make data-driven decisions to improve their applications.

What are @firebase/analytics's main functionalities?

Event Tracking

This feature allows developers to track custom events within their application. The code sample demonstrates how to log a 'purchase' event with additional parameters describing the item purchased.

firebase.analytics().logEvent('purchase', {item: 'blue jeans', size: 'L'});

Screen Tracking

Enables tracking of user visits to different screens within the application, useful for understanding user flows and engagement. The code sample sets the current screen to 'Homepage' with an optional screen class override.

firebase.analytics().setCurrentScreen('Homepage', 'homepage_screen');

User Properties

This allows the setting of user properties which can be used to segment users in analytics reports. The code sample demonstrates setting a user property for the user's favorite food.

firebase.analytics().setUserProperties({favorite_food: 'pizza'});

Other packages similar to @firebase/analytics

FAQs

Package last updated on 17 Jul 2025

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