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

@firebase/analytics-compat

Package Overview
Dependencies
Maintainers
4
Versions
1100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/analytics-compat

This is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.

  • 0.2.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
increased by2.74%
Maintainers
4
Weekly downloads
 
Created

What is @firebase/analytics-compat?

The @firebase/analytics-compat package is designed to provide a compatibility layer for Firebase Analytics within the Firebase JavaScript SDK. It allows developers to use Firebase Analytics with an API that is compatible with the older versions of Firebase, making it easier to integrate into projects that were built with the legacy Firebase SDK.

What are @firebase/analytics-compat'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 such as item, quantity, and price.

firebase.analytics().logEvent('purchase', {item: 'book', quantity: 1, price: 19.99});

User Properties

This feature enables the setting of user properties which can be used to segment users within analytics reports. The code sample shows how to set a user property 'favorite_food' to 'pizza'.

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

Screen Tracking

This feature is used to track user navigation within the app. The code sample illustrates how to set the current screen to 'Homepage' which helps in analyzing user flow and engagement on specific screens.

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

Other packages similar to @firebase/analytics-compat

FAQs

Package last updated on 18 Sep 2024

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