en | fr

The Analytics class


Class responsible for managing the listening analytics inside the application.

IndexedDB is used under the hood. Checkout the Database class for further information. There’s a table for each service (i.e. soundcloud, youtube, local).

The data are stored as JSON objects with an id and playback_count field. For instance:

{id: '/path/to/file.mp3', playback_count: 5}

increase

Increases the playback count value of a record inside the database.

Parameters

Returns Promise


store

Stores a brand new entry in the analytics database.

Parameters

Returns Promise