API Reference

Custom Events

Track custom user actions from your landing page or application using the Superfunnel JavaScript SDK or REST API.

Client-side (JavaScript SDK)

Add the Superfunnel snippet to your page and call superfunnel.track() to send events:

<script>
  window.superfunnel = window.superfunnel || {};
  superfunnel.apiKey = 'YOUR_API_KEY';
</script>
<script src="https://cdn.superfunnel.ai/sdk.js" async></script>

Track an event

superfunnel.track('lead_submitted', {
  email: 'user@example.com',
  funnel_id: 'funnel_abc123',
  value: 49.99,
})

Server-side (REST API)

POST /v1/events

Request body

{
  "event": "lead_submitted",
  "api_key": "YOUR_API_KEY",
  "properties": {
    "email": "user@example.com",
    "funnel_id": "funnel_abc123",
    "value": 49.99
  }
}

Response

{
  "success": true,
  "event_id": "evt_01HXQ..."
}

Parameters

ParameterTypeRequiredDescription
eventstringYesEvent name (e.g. lead_submitted)
api_keystringYesYour Superfunnel API key
propertiesobjectNoArbitrary key-value metadata
properties.emailstringRecommendedUser email for identity matching
properties.funnel_idstringRecommendedSuperfunnel funnel identifier
properties.valuenumberNoMonetary value for conversion reporting