post https://api.mixpanel.com/track
Track events to Mixpanel from client devices. We recommend using one of our client-side SDKs instead of using /track directly, as our SDKs provide queueing, retrying, batching, and more.
When to use /track vs /import
Typically, we recommend using /import for server-side integrations as it is more scalable and supports ingesting historical data. We only recommend /track for client-side tracking in an environment for which we don't have SDK support or if you're sending data via some other untrusted environment (eg: third-party webhooks that send data to Mixpanel).
/track | /import | |
---|---|---|
Events per request | 50 | 2000 |
Authentication | Project Token, intended for untrusted clients. | Project Secret, intended for server-side integration. |
Compression | None | Gzip allowed |
Content-Type | application/x-www-form-urlencoded | application/json or application/x-ndjson |
Ingesting historical events | Last 5 days only. | Any time after 1971-01-01. |
Limits
The limits for track are the same as /import, see here.