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
| Parameter | Type | Required | Description |
|---|---|---|---|
event | string | Yes | Event name (e.g. lead_submitted) |
api_key | string | Yes | Your Superfunnel API key |
properties | object | No | Arbitrary key-value metadata |
properties.email | string | Recommended | User email for identity matching |
properties.funnel_id | string | Recommended | Superfunnel funnel identifier |
properties.value | number | No | Monetary value for conversion reporting |