API Reference
Complete API documentation with examples
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, FID, CLS, TTFB, load time, and more.
customCustom events with your own event names and properties.
goalGoal tracking events from data-ed-goal attributes or JavaScript SDK.
errorJavaScript error tracking with stack traces and context.
heartbeatPresence detection - sent every 30 seconds while 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"track(eventName, properties?)Track a custom event with optional properties
trackPageView(url?, title?)Optional: track a virtual page view (auto-tracked by default)
identify(userId, traits?)Identify a user and associate traits
trackError(error, context?)Manually track an error with optional context
flush()Flush all pending events immediately