Skip to content

API Reference

Event types, ingest endpoints, response codes, and SDK methods.

Event Types
All supported event types and their properties
pageview
All Plans

Automatically tracked when a page loads. Includes URL, title, and referrer.

Properties: pageUrl, pageTitle, referrer
click
All Plans

User clicks on elements. Captures element details, position, and attributes.

Properties: element, position, attributes
form_submit
All Plans

Form submission events with form name and field information (PII filtered).

Properties: formName, fields
scroll
All Plans

Scroll depth tracking at 25%, 50%, 75%, and 100%.

Properties: depth, element
performance
Standard+

Web Vitals: FCP, LCP, INP, CLS, TTFB, load time, and more.

Properties: lcp, inp, cls, fcp, ttfb
custom
Standard+

Custom events with your own event names and properties.

Properties: name, properties
goal
All Plans

Goal tracking from data-ed-goal attributes, trackGoal(), or /api/goals.

Properties: name, properties
error
Standard+

JavaScript error tracking with stack traces and context.

Properties: message, stack, context
heartbeat
All Plans

Presence detection - sent periodically while the page is visible.

REST API Endpoints

POST /api/events

Submit events to EventDash. Supports batch submission.

bash
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.

bash
curl -X GET https://www.eventda.sh/api/validate \
  -H "X-API-Key: ed_your_api_key"
Response Codes
200
Success - Events processed
400
Bad Request - Invalid request format
401
Unauthorized - Invalid API key
403
Forbidden - Quota exceeded or plan restriction
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error
MCP
Agents query the same analytics over Streamable HTTP. Tracking keys cannot call MCP.

Endpoint POST /api/mcp. See MCP docs and the tool reference.

JavaScript SDK Methods
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