APIYard
Back to APIs
AnalyticsBearer TokenFree tier

Mixpanel

Mixpanel tracks user interactions and lets you analyze funnels, retention, cohorts, and custom events across platforms.

Base URL

https://mixpanel.com/api/2.0
funnelsretentioncohortseventsmobile

Endpoints

POST/track

Track a user event in Mixpanel.

const response = await fetch("https://mixpanel.com/api/2.0/track", {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  body: JSON.stringify({
  "data": "W3siZXZlbnQiOiJTaWduIFVwIiwicHJvcGVydGllcyI6eyJkaXN0aW5jdF9pZCI6InVzZXJfMTIzIiwidG9rZW4iOiJZT1VSX1RPS0VOIiwicGxhbiI6InBybyJ9fV0="
})
});

const data = await response.json();
console.log(data);

Response Preview

1