Guides Getting Started Compliance Modules Node JS Python API Reference Tracking API Analytics API

Analytics API

Welcome to the Analytics API. This API can be used to retrieve data collected by Nucleus.

This API is in beta for now, please let us know if you encounter any issue or if you need to fetch a specific data that isn't documented here, we strive to be fast to respond. We will add more endpoints over time.

Authentication

Nucleus expects for the API key to be included in all requests to the server in a header that looks like the following:

Authorization: your_access_token

Example:

curl "api_endpoint_here"
    -H "Authorization: your_access_token"

You may also send it in the body of a POST request as the parameter token.

Quick Glance

Fetch the number of users, installs and more during the last 24 hours.

HTTP Request

GET https://nucleus.sh/app/:appId/analytics/quickglance

It will return the numbers like this:

{
    "realTime": 5,
    "installs": 9,
    "users": 29,
    "appStarts": 75
}

Daily analytics

The daily analytics data for your application.

You need to supply a date interval as timestamps.

HTTP Request

GET https://nucleus.sh/app/:appId/analytics

Parameter Optional Description
start required Timestamp for beginning of interval
end required Timestamp for end of interval
utcOffset optional Your timezone UTC offset (in minutes) so we can return the appropriate dates

It will return various data on your app like the following. Where each object contains a key/value pair for every day in the period you supplied.

{
    "totalEvents": {},
    "usage": {},
    "newUsers": {},
    "activeUsers": {},
    "nonNewUsers": {},
    "hours": {},
    "platforms": {},
    "errors": {},
    "languages": {},
    "ram": {},
    "versions": {},
    "events": {},
    "countries": {}
}