πŸ“ˆ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

To add support for an Analytics Provider see this guide.

Last updated