mixpanel

by dragonkhoi
Verified

aggregate_event_counts

Get unique, total, or average data for a set of events over N days, weeks, or months

Input Schema

NameRequiredDescriptionDefault
eventsYesThe event or events that you wish to get data for, encoded as a JSON array. Example format: "["play song", "log in", "add playlist"]"
from_dateNoThe date in yyyy-mm-dd format to begin querying from (inclusive)
intervalNoThe number of units to return data for. Specify either interval or from_date and to_date
project_idNoThe Mixpanel project ID
to_dateNoThe date in yyyy-mm-dd format to query to (inclusive)
typeNoThe type of data to fetch
unitYesThe level of granularity of the data you get back

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "events": { "description": "The event or events that you wish to get data for, encoded as a JSON array. Example format: \"[\"play song\", \"log in\", \"add playlist\"]\"", "type": "string" }, "from_date": { "description": "The date in yyyy-mm-dd format to begin querying from (inclusive)", "type": "string" }, "interval": { "description": "The number of units to return data for. Specify either interval or from_date and to_date", "type": "number" }, "project_id": { "description": "The Mixpanel project ID", "type": "string" }, "to_date": { "description": "The date in yyyy-mm-dd format to query to (inclusive)", "type": "string" }, "type": { "description": "The type of data to fetch", "enum": [ "general", "total", "unique", "average" ], "type": "string" }, "unit": { "description": "The level of granularity of the data you get back", "enum": [ "minute", "hour", "day", "week", "month" ], "type": "string" } }, "required": [ "events", "unit" ], "type": "object" }