Querying Custom Events Via Mixpanel API

  • 30 July 2019
  • 3 replies

Userlevel 5
Badge +4

To query for custom events via any formatted Mixpanel API endpoint, find the stored name of that custom event. When a custom event is created, Mixpanel creates a new object for the event. You can find the exact name of your custom event via the XHR section of your browser’s developer console and copy the name into your query.

  1. Go to Insights, and select your custom event in the your events dropdown.

  2. Open your browser’s developer console (for Google Chrome, Option + Command + j on a Mac; Ctrl + Shift + j on a PC).

  3. Grab the $custom_event: value:


Then, pass that $custom_event in as the value of the event parameter in your request.

This is a useful tip for when using Mixpanel with Geckoboard, whose Top Event Property List widget will show only native events (not custom events) by default.

Note that custom events may only be used within Mixpanel’s formatted API endpoints and not the raw event export API.



3 replies

@stephanie Any pointers on using the $custom_event in the value of the event parameter?

I’m struggling with actually using the custom event id I found in a query as the “value of the event parameter” (passing it in). Selectors use properties of the event and the ‘name’ property requires a string.  Thanks.

Badge +4

Is the ability to extract the custom event id via Chrome Dev Tools still functional? I notice that segmentation is no longer visible in the list of XHRs. 


Hi everyone, a great way to query a custom event via the API is to check for the custom event ID in Lexicon. The URL link for the customevent in Lexicon will contain the ID, you can then query for the event in the event section for the API request like so: