aggregate_event_counts
Analyze event trends over time by fetching unique, general, or average data for specific events. Supports granularity in minutes, hours, days, weeks, or months for trend analysis and performance comparisons.
Instructions
Get unique, general, or average data for a set of events over N days, weeks, or months. Useful for trend analysis, comparing event performance over time, and creating time-series visualizations.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
event | Yes | The event or events that you wish to get data for, a string encoded as a JSON array. Example format: "["play song", "log in", "add playlist"]" | |
from_date | No | The date in yyyy-mm-dd format to begin querying from (inclusive) | |
interval | No | The number of units to return data for. Specify either interval or from_date and to_date | |
project_id | No | The Mixpanel project ID. Optional since it has a default. | |
to_date | No | The date in yyyy-mm-dd format to query to (inclusive) | |
type | No | The type of data to fetch, either general, unique, or average, defaults to general | |
unit | Yes | The level of granularity of the data you get back |