How to use the Analytics query builder outside of the Dashboard?

To use the Query Builder, you can install our legacy JS API client and run the following code :

const Bitmovin = require("bitmovin-javascript").default;

const BITMOVIN_API_KEY = 'YOUR_API_KEY_HERE';
const myAnalyticsKey = 'YOUR_ANALYTICS_KEY_HERE;
const bitmovin = new Bitmovin({apiKey: BITMOVIN_API_KEY, debug: true});
const queryBuilder = bitmovin.analytics.queries.builder;

queryBuilder
.licenseKey(myAnalyticsKey)
.count('IMPRESSION_ID')
.between('2024-05-23T20:09:23.69Z', '2024-06-25T15:09:23.69Z')
.groupBy("DEVICE_CLASS")
.query()
.then(console.log);

Bitmovin Javascript repository :

To use the query builder within the Dashboard, you can visit the following link :

1 Like