Skip to main content

Overview

The Analytics API provides comprehensive metrics for your projects and affiliate codes, including views, downloads, playtime statistics, and revenue data. All analytics data is aggregated into time slices for efficient querying.
Analytics endpoints require authentication with appropriate scopes:
  • ANALYTICS scope for views, downloads, and playtime
  • PAYOUTS_READ scope for revenue data

Fetch Analytics Data

Fetch analytics data with customizable time ranges, metrics, and bucketing options.

Request Body

object
required
Defines the time period and resolution for analytics data.
object
required
Specify which metrics to return and how to group them.

Response Format

Returns an array of time slices, where each slice contains analytics data for that time period.
array
Array of time slices (length determined by resolution).

Examples

Basic Views and Downloads

Downloads by Version

Views by Referrer

Playtime Statistics

Revenue Data

Example Response

Bucketing Behavior

Bucketing allows you to group analytics data by specific dimensions:
When bucket_by is empty, all data for that metric is aggregated:
Bucketing by one field creates separate entries:
Multiple bucket fields create combinations:

Data Sources

Clickhouse

Views, downloads, playtime, and affiliate click data is stored in Clickhouse for high-performance querying

PostgreSQL

Revenue and conversion data comes from PostgreSQL transaction records

Privacy & Anonymization

Country data is automatically anonymized when counts are below 50 to protect user privacy. Low-traffic countries are reported as “XX”.

Best Practices

Choose resolution based on your time range:
  • Hours: Use minute-based resolution
  • Days/Weeks: Use 24-96 slices
  • Months: Use 30-31 slices
  • Years: Use 12 or 52 slices
Only bucket by fields you need:
  • Fewer buckets = faster queries
  • More buckets = more detailed data
  • Consider client-side aggregation for flexibility
Keep queries reasonable:
  • Maximum 1024 time slices
  • Minimum 60-minute resolution
  • Larger ranges need coarser resolution
Request multiple metrics in one call for efficiency:

Permissions

Analytics data is filtered by project permissions:
  • You can only view analytics for projects where you have VIEW_ANALYTICS permission
  • This includes:
    • Projects you own
    • Projects where you’re a team member with analytics access
    • Projects in organizations where you have the appropriate role
Revenue data requires the PAYOUTS_READ scope in addition to ANALYTICS. Requests without this scope will return an authentication error when accessing revenue metrics.