BlueRain
Github
  • πŸ’§Introduction
  • Overview
    • πŸ“²Quick Start
    • πŸŽ›οΈConfiguration with bluerain.js
    • 🎑Lifecycle Events
    • πŸ›£οΈRoadmap
  • Key Concepts
    • πŸ”ŒPlugins
      • Developing an Analytics Plugin
      • Developing a Logger Plugin
      • Developing a Theme Plugin
    • 🎣Hooks
    • 🎁Components
    • πŸ“¦BlueRain Modules
    • πŸŽ›οΈConfigs
    • πŸ“ˆAnalytics
    • πŸ“”Logger
    • 🎨Themes
      • Installation
      • Consuming Selected Theme
      • Customise Themes
      • Customise Components
      • Theme Configs
      • Theme Structure
    • Registry
  • Guides
    • πŸ—ΏIcons
    • πŸ›‚Migrating from V3
  • Components
    • Typography
    • Icons
      • Icon
      • DynamicIcon πŸ“Œ
      • PluginIcon πŸ“Œ
  • CLI
    • Expo
    • Web
    • Storybook (Web)
    • Storybook Native (Expo)
Powered by GitBook
On this page
  • Track Events
  • Record a Custom Event with Attributes
  • Record Engagement Metrics
  • Integrations
  1. Key Concepts

Analytics

The Analytics API enables you to collect analytics data for your app.

Track Events

To record an event use the trackΒ method of BlueBase's Analytics API.

BB.Analytics.track({ name: 'albumVisit' });

Record a Custom Event with Attributes

The track method lets you add additional attributes to an event. For example, to record artist information with an albumVisit event:

BB.Analytics.track({
    name: 'albumVisit', 
    // Attribute values must be strings
    attributes: { genre: '', artist: '' }
});

Record Engagement Metrics

Data can also be added to an event:

BB.Analytics.track({
    name: 'albumVisit', 
    attributes: {}, 
    metrics: { minutesListened: 30 }
});

Integrations

PreviousConfigsNextLogger

Last updated 6 years ago

To add support for an Analytics Provider see this .

πŸ“ˆ
guide