Get data from a database

All requests for data can be passed a parameters object to query over a time range:

const params = [
    start: new Date(2015, 0, 1),
    end: new Date(2015, 2, 1)
};

Get complete analytics

// Full query
const result = await analytics.list(DBNAME);
// result.list is an array containing the whole DB

// Example with optional time range
// The same applies for all data requests
const result = await analytics.list(DBNAME, params);

A full description for result can be found here.

Get the count of analytics

const result = await analytics.count(DBNAME);
// result looks like { total: 300, unique: 150 }

A full description for result can be found here.

Get aggregated analytics by countries

A full description for countries can be found here.

Get aggregated analytics by platforms

A full description for platforms can be found here.

Get aggregated analytics by domains

A full description for domains can be found here.

Get aggregated analytics by events

A full description for events can be found here.

Get aggregated analytics as a time series

With overTime(), the parameter object can take an interval key to specify the time serie interval in seconds. By default, the service sets the interval to 86400 (which is equal to one day).

A full description for timeSerie can be found here.

Last updated

Was this helpful?