# EventDash documentation (full) Canonical HTML docs: https://www.eventda.sh/docs Index: https://www.eventda.sh/llms.txt --- # AGENTS.md You are helping a developer add EventDash (cookieless product analytics) to their project, or query EventDash analytics. ## Product - Tracker: `https://www.eventda.sh/tracker.js` (~11 KB gzip) - Tracking keys start with `ed_` and belong in the public snippet. - MCP keys: `edt_` account token, `edr_` per-app read key. Never put these in the tracker. - MCP endpoint: https://www.eventda.sh/api/mcp (read-only Streamable HTTP) - Docs: https://www.eventda.sh/llms.txt · https://www.eventda.sh/llms-full.txt · https://www.eventda.sh/docs/ai.md ## Install (user's repo) 1. Do not invent API keys. Ask the user to create a tracking key in EventDash app settings, or read `NEXT_EVENTDASH_API_KEY` / existing script tags. Do not echo the full secret in chat. 2. Detect the stack: - Next.js App Router → `app/layout.tsx` + `.env.local` `NEXT_EVENTDASH_API_KEY` (see https://www.eventda.sh/docs/installation/nextjs.md) - Next.js Pages Router → `pages/_app.tsx` - React / Vue SPA → script in `public/index.html` - Other → HTML script tag in `` 3. Ensure `.env.local` is gitignored. Tracker keys still appear in HTML by design. 4. Page views are automatic. Add `data-ed-goal` on 1–3 primary CTAs. Use `data-ed-scroll` only if they asked for section views. 5. Optional: `data-allow-localhost="true"` for local testing. ## Query analytics If the user wants numbers, drop-off, or top pages: use MCP, not inventing a REST read API. Account tokens need `appId` (call `eventdash_apps_list` first). Do not invent write actions. ## Do not - Mix tracking keys and MCP tokens - Send emails, names, or other PII in goal params - Use `track()` for conversions (that is a custom event on Standard+). Use `trackGoal` / `data-ed-goal` --- --- name: eventdash description: Adds the EventDash cookieless analytics tracker to a site (Next.js, React, Vue, or HTML), marks conversions with data-ed-goal, and points at read-only MCP for querying analytics. Use when the user asks to add EventDash, cookieless analytics, data-ed-goal, product analytics, or a Google Analytics alternative tracker. --- # EventDash tracker Install EventDash in the current project. Querying live analytics is MCP (https://www.eventda.sh/docs/mcp.md), not this skill. ## Rules - Tracking key prefix `ed_` only in the snippet. MCP tokens `edt_` / `edr_` never go in the tracker. - Do not generate keys. Have the user set `NEXT_EVENTDASH_API_KEY` (or the HTML `data-api-key`) from EventDash app settings → Tracker API keys. Read the env file if it already exists. Do not echo the full key in chat. - Prefer `data-ed-goal` over custom JavaScript. `track()` is not a goal. - Follow https://www.eventda.sh/docs/installation/nextjs.md (or react/vue/html) exactly for the detected stack. - Keep `.env.local` out of git. ## Steps 1. Detect Next.js (App vs Pages), React, Vue, or plain HTML. 2. Add the script from https://www.eventda.sh/tracker.js with `data-api-key`. Next.js: `NEXT_EVENTDASH_API_KEY` + `next/script` `afterInteractive`. 3. Confirm page views need no extra code. 4. Add `data-ed-goal` on 1–3 primary conversion buttons or links. Use snake_case names like `signup_clicked`. 5. If they want editor queries, show https://www.eventda.sh/docs/mcp.md and say MCP is read-only. Details: https://www.eventda.sh/skills/eventdash/reference.md --- # Quick Start Four steps from signup to live analytics. Free plan: 10,000 events/month and 1 app. 1. Create an app at https://www.eventda.sh/signup (no card). 2. Generate a tracking API key in app settings → Tracker API keys. It starts with `ed_`. Copy it once. 3. Install the tracker (~11 KB gzip): ```html ``` 4. Page views start automatically. Optionally tag a CTA: ```html ``` Do not use `edt_` or `edr_` keys in the snippet. Those are MCP credentials. Next: https://www.eventda.sh/docs/installation.md · https://www.eventda.sh/docs/features/funnels.md --- # Installation Guides Choose your platform. Start with the script tag; add goals when you need conversions. - Next.js: https://www.eventda.sh/docs/installation/nextjs.md - React: https://www.eventda.sh/docs/installation/react.md - Vue.js: https://www.eventda.sh/docs/installation/vue.md - HTML: https://www.eventda.sh/docs/installation/html.md Any site that can load a script works — use the HTML guide as a universal approach. Tracker: `https://www.eventda.sh/tracker.js` Tracking key prefix: `ed_` only. --- # Next.js Installation Never commit API keys. Put `.env.local` in `.gitignore`. Use a server env var. The key is still emitted on the script tag (tracker keys are public by design). ## App Router ```bash # .env.local NEXT_EVENTDASH_API_KEY=ed_your_api_key_here ``` ```tsx // app/layout.tsx import Script from 'next/script' export default function RootLayout({ children }: { children: React.ReactNode }) { return ( ``` Page views are tracked automatically. Prefer HTML attributes: ```jsx ``` Or `window.eventDash.trackGoal('signup_clicked', { page: 'homepage' })`. Custom `track()` events need Standard or Pro. --- # Vue.js Installation Add the tracker to `public/index.html`: ```html ``` In templates: ```html ``` Or call `window.eventDash.trackGoal(...)` from a click handler. Custom `track()` events need Standard or Pro. --- # HTML Installation ```html ``` Optional attributes: - `data-domain` — domain being tracked - `data-allow-localhost="true"` — enable localhost (default false) - `data-debug="true"` — debug logging ```html
Pricing
``` --- # Tracking Methods All browser options require the tracker script and an `ed_` tracking key. - HTML attributes: https://www.eventda.sh/docs/tracking/html-attributes.md — `data-ed-goal`, `data-ed-scroll` - JavaScript SDK: https://www.eventda.sh/docs/tracking/javascript-sdk.md — `window.eventDash` - REST ingest: https://www.eventda.sh/docs/tracking/api.md — `POST /api/events`, `POST /api/goals` Prefer attributes for common CTAs. Use the SDK when you need to fire a goal from logic. Use REST from backends and workers. --- # HTML Attributes The tracker script must be installed first. ## Goals ```html View Pricing ``` Kebab-case `data-ed-goal-*` params become snake_case properties. Alias `data-fast-goal` works for goals only; prefer `data-ed-*`. ## Scroll ```html
``` Threshold is 0–1 (default ~0.5). There is no `data-fast` alias for scroll. --- # JavaScript SDK After the script loads, use `window.eventDash`. Use `trackGoal()` for conversions. `track()` is custom events on Standard and Pro. ```javascript window.eventDash.trackGoal('signup', { plan: 'pro', source: 'pricing_page' }) window.eventDash.trackGoal('purchase', { order_id: '12345', amount: 99.99, currency: 'USD' }) window.eventDash.trackPageView('/custom-page', 'Custom Page Title') // optional virtual page window.eventDash.identify('user-123', { plan: 'pro', accountType: 'team' }) // non-PII traits window.eventDash.trackError(error, { context: 'payment_processing' }) await window.eventDash.flush() ``` Queue before the SDK loads: ```html ``` Then `window.eventdash('signup', { plan: 'pro' })`. Methods: `trackGoal`, `track`, `trackPageView`, `identify`, `trackError`, `flush`. --- # REST API Server-side ingest only. Not a read API. Query analytics via MCP (https://www.eventda.sh/docs/mcp.md). ## Endpoints - `POST https://www.eventda.sh/api/events` - `POST https://www.eventda.sh/api/goals` Auth: `X-API-Key: ed_...` or `Authorization: Bearer ed_...` ## Events batch ```json { "id": "batch_123", "sessionId": "session_abc", "anonymousId": "anon_xyz", "timestamp": 1234567890000, "compressed": false, "events": [ { "type": "pageview", "timestamp": 1234567890000, "pageUrl": "https://example.com/page", "pageTitle": "Page Title", "referrer": "https://google.com" } ] } ``` ## Goal payload ```json { "goal_name": "signup", "anonymous_id": "anon_xyz", "page_url": "https://example.com/pricing", "metadata": { "plan": "pro" } } ``` Responses: 200 ok, 400 invalid, 401 bad key, 403 quota or plan, 429 rate limit. --- # Features - Goals: https://www.eventda.sh/docs/features/goals.md — `data-ed-goal` / `trackGoal()` - Share: https://www.eventda.sh/docs/features/share.md — public links, iframe embed, `data-ed-stat` tags - Search Console: https://www.eventda.sh/docs/features/seo.md — GSC indexation next to hourly EventDash traffic (Standard+); no general submit-URL API - Ecommerce: https://www.eventda.sh/docs/features/ecommerce.md — search, view_item, add_to_cart, purchase goals - Funnels: https://www.eventda.sh/docs/features/funnels.md — dashboard conversion paths, last 90 days of raw events - Scroll: https://www.eventda.sh/docs/features/scroll-tracking.md — `data-ed-scroll` - Performance: https://www.eventda.sh/docs/features/performance.md — Web Vitals (Standard+ details) - Privacy: https://www.eventda.sh/docs/features/privacy.md — no cookies, PII filter, DNT --- # Goal Tracking Prefer `data-ed-goal` or `trackGoal()`. `track()` creates a custom event (Standard+), not a goal. ```html ``` ```javascript window.eventDash.trackGoal('signup_clicked', { page: 'homepage' }) ``` Use clear names. Wire important goals into funnels in the dashboard. --- # Ecommerce tracking Use `trackGoal()` or `data-ed-goal`, not `track()`. Custom events are Standard+ and do not count as conversions. Recommended names: `search` (query, results_count), `view_item_list` (list_name), `view_item`, `add_to_cart`, `begin_checkout`, `purchase` (amount, currency, order_id). Alias: `purchase_completed`. Fire `purchase` on the thank-you page after payment succeeds. Send a flat order total, not nested line items. HTML: https://www.eventda.sh/docs/features/ecommerce --- # Funnels Create funnels in the dashboard from page views and goals. Stats use the last 90 days of raw events. This is not cohort retention analytics. 1. Open an app → Funnels → create. 2. Add ordered steps matching page URLs, goals, or other tracked events. 3. View conversion and drop-off between steps. Agents can query an existing funnel with MCP `eventdash_funnels_list` then `eventdash_analytics_funnel`. Do not invent write tools; funnel create/update is dashboard-only. --- # Search Console Standard and Professional. Connect the Google Search Console property that matches the app domain. - Performance chart: clicks, impressions, CTR, position (web search, ~28 days). GSC daily totals lag ~2 days; GSC last 24 hours is delayed several hours - Needs attention: EventDash pages with traffic that GSC shows as not indexed or zero impressions. EventDash views are current to this hour - Inspect: URL Inspection API (coverage only; does not submit the URL) - Request indexing: opens Search Console — Google has no general submit-URL API - Sitemap: submit /sitemap.xml for the connected property Human docs: https://www.eventda.sh/docs/features/seo --- # Scroll Tracking ```html
``` Threshold is 0–1. Delay is milliseconds. Extra `data-ed-scroll-*` params are allowed (for example `data-ed-scroll-section-name`). --- # Performance Metrics The tracker can collect Core Web Vitals (LCP, INP, CLS, FCP, TTFB) after install. Detailed performance storage and exports are Standard and Pro. Query averages via MCP `eventdash_analytics_performance`. --- # Privacy & Security - No cookies. Anonymous session ID in localStorage. - PII filter strips emails, phones, SSNs, and card numbers from URLs and form data. - Respects Do Not Track. - Do not send emails, names, or other PII in goal params or `identify` traits. See also https://www.eventda.sh/privacy --- # EventDash MCP Query EventDash analytics from Cursor, Claude Code, Codex, and VS Code. Read-only. Endpoint: https://www.eventda.sh/api/mcp HTML docs: https://www.eventda.sh/docs/mcp ## Tokens - `edt_` account token (default): Settings → API / MCP. Optional app allowlist. - `edr_` app read key: one app, mostly analytics. - `ed_` tracking keys: ingest only. They cannot call MCP. Never put MCP tokens in the tracker snippet. Never paste secrets into chat. Configure credentials in the MCP client. ## Connect Cursor / VS Code `mcp.json`: ```json { "mcpServers": { "eventdash": { "url": "https://www.eventda.sh/api/mcp", "headers": { "Authorization": "Bearer edt_xxx" } } } } ``` Claude Code: ```bash claude mcp add --transport http eventdash https://www.eventda.sh/api/mcp \ --header "Authorization: Bearer edt_xxx" ``` Codex: store the token in `EVENTDASH_TOKEN`, then: ```bash codex mcp add eventdash \ --url https://www.eventda.sh/api/mcp \ --bearer-token-env-var EVENTDASH_TOKEN ``` stdio-only clients can use `npx -y mcp-remote` with the same URL and Authorization header. Tool reference: https://www.eventda.sh/docs/mcp/tools.md For agents (install tracker): https://www.eventda.sh/docs/ai.md --- # EventDash MCP tools Read-only. Account tokens need `appId` on analytics tools unless you use an `edr_` key. ## Apps - `eventdash_apps_list` (apps:read): List apps this token can access. Use this first with an account token to get appId values. - `eventdash_apps_get` (apps:read): Get one app (id, name, domain). Account tokens need appId; app read keys do not. ## Analytics - `eventdash_analytics_overview` (analytics:read): KPI totals for a date range: events, pageviews, unique visitors, bounce rate, sessions. Prefer this over listing individual events. - `eventdash_analytics_timeseries` (analytics:read): Hourly or daily timeline of events, pageviews, and unique visitors. - `eventdash_analytics_realtime` (analytics:read): Active sessions in the last 5 minutes (country and device only, no identifiers). - `eventdash_analytics_pages` (analytics:read): Top pages by views for a date range. - `eventdash_analytics_referrers` (analytics:read): Traffic referrer breakdown for a date range (raw events, last 90 days). - `eventdash_analytics_campaigns` (analytics:read): UTM source / medium / campaign breakdown for a date range. - `eventdash_analytics_countries` (analytics:read): Country breakdown by event volume. - `eventdash_analytics_devices` (analytics:read): Device, browser, and OS breakdown. - `eventdash_analytics_performance` (analytics:read): Average Web Vitals (LCP, INP, FCP, load time) from daily rollups. - `eventdash_analytics_events` (analytics:read): Recent event rows (max 100). Filter by type, name, page, or country. Does not include IP addresses. - `eventdash_analytics_goals` (analytics:read): Goal completions grouped by event name for a date range. - `eventdash_analytics_funnel` (funnels:read): Step-by-step conversion and drop-off for one funnel. Pass funnelId from eventdash_funnels_list. ## Funnels - `eventdash_funnels_list` (funnels:read): List funnels and steps for an app. ## Account - `eventdash_account_get` (any token): Plan tier and monthly event usage versus quota. Setup: /docs/mcp.md --- # EventDash for coding agents Install the tracker in the user's repo. Query analytics over MCP. Do not invent keys. ## Files - Index: https://www.eventda.sh/llms.txt - Full docs: https://www.eventda.sh/llms-full.txt - Repo instructions: https://www.eventda.sh/AGENTS.md - Skill: https://www.eventda.sh/skills/eventdash/SKILL.md - MCP: https://www.eventda.sh/docs/mcp.md - API catalog: https://www.eventda.sh/.well-known/api-catalog - MCP Server Card: https://www.eventda.sh/.well-known/mcp/server-card.json - Agent Skills index: https://www.eventda.sh/.well-known/agent-skills/index.json - ARD AI catalog: https://www.eventda.sh/.well-known/ai-catalog.json ## Markdown for agents Request any public page with `Accept: text/markdown` to receive a formatting-stripped markdown representation (`Content-Type: text/markdown`). HTML remains the default for browsers. Docs also have `.md` twins (example https://www.eventda.sh/docs/quickstart.md). ## Install the skill Copy https://www.eventda.sh/skills/eventdash/SKILL.md to `.cursor/skills/eventdash/SKILL.md` (and optionally `reference.md`). For Claude Code, use `.claude/skills/eventdash/`. ## Rules - Tracking key `ed_` goes in the public snippet only. - MCP tokens `edt_` / `edr_` stay in the MCP client. Never in the tracker. - Do not echo full secrets in chat. Read from `.env.local` or the dashboard. - MCP is read-only. --- # Plans & limits | Plan | Price | Events / month | Apps | Raw detail | | --- | --- | --- | --- | --- | | Free | $0 | 10,000 | 1 | 30 days | | Standard | $19/mo | 100,000 | 5 | 90 days | | Professional | $99/mo | 500,000 | 25 | 90 days | Annual: Standard $190/year, Professional $999/year. Free: page views, clicks, scrolls, goals. Standard & Pro: custom events, error tracking, performance details, exports. Raw event rows follow the plan window. Dashboard charts use rollups. Quota exceeded → ingest returns 403. --- # API Reference HTML: https://www.eventda.sh/docs/api-reference ## Event types - `pageview` — all plans (pageUrl, pageTitle, referrer) - `click` — all plans - `form_submit` — all plans (PII filtered) - `scroll` — all plans - `goal` — all plans (`data-ed-goal`, `trackGoal`, `POST /api/goals`) - `performance` — Standard+ - `custom` — Standard+ - `error` — Standard+ Ingest: `POST /api/events`, `POST /api/goals` with `ed_` key. Read analytics: MCP https://www.eventda.sh/docs/mcp.md