API Reference
Event types, ingest endpoints, response codes, and SDK methods.
pageviewAutomatically tracked when a page loads. Includes URL, title, and referrer.
clickUser clicks on elements. Captures element details, position, and attributes.
form_submitForm submission events with form name and field information (PII filtered).
scrollScroll depth tracking at 25%, 50%, 75%, and 100%.
performanceWeb Vitals: FCP, LCP, INP, CLS, TTFB, load time, and more.
customCustom events with your own event names and properties.
goalGoal tracking from data-ed-goal attributes, trackGoal(), or /api/goals.
errorJavaScript error tracking with stack traces and context.
heartbeatPresence detection - sent periodically while the page is visible.
POST /api/events
Submit events to EventDash. Supports batch submission.
curl -X POST https://www.eventda.sh/api/events \
-H "Content-Type: application/json" \
-H "X-API-Key: ed_your_api_key" \
-d '{
"id": "batch_123",
"sessionId": "session_abc",
"anonymousId": "anon_xyz",
"timestamp": 1234567890000,
"compressed": false,
"events": [...]
}'GET /api/validate
Validate an API key and check quota status.
curl -X GET https://www.eventda.sh/api/validate \
-H "X-API-Key: ed_your_api_key"Endpoint POST /api/mcp. See MCP docs and the tool reference.
trackGoal(name, properties?)Track a conversion goal (preferred for funnels)
track(eventName, properties?)Track a custom event (Standard+ plans)
trackPageView(url?, title?)Optional: track a virtual page view (auto-tracked by default)
identify(userId, traits?)Associate an anonymous visitor with your internal user id (avoid PII)
trackError(error, context?)Manually track an error with optional context (Standard+)
flush()Flush all pending events immediately