countedDocumentation

Counted for developers

Your first event in a few lines.

Create a project, track an action, and see it arrive.

1. Create a project

Open the app and choose Projects → New project. Name it. Your project opens with its first ingest key already in the setup code.

Copy the code before leaving: keys are shown only once. An ingest key is safe to embed in your app and can only send events to that project. For an existing project, use a saved ingest key or create one from its Overview or Keys page.

2. Track an action

npm install @counted/sdk
import { Counted } from "@counted/sdk";

const counted = new Counted({ key: "YOUR_INGEST_KEY" });
counted.track("page_view", { path: "/welcome" });

Create one client per app. Call track() when an action happens. The SDK handles batching, retries, duplicate protection, and temporary visits in memory. In the browser, it sends queued events automatically.

In a short-lived Node.js or Bun script, finish with await counted.shutdown() to flush queued events before exiting. In serverless handlers, create the client within the invocation and await shutdown before returning.

Use stable event names and bounded properties such as a route template, feature name, or plan. Do not send emails, names, tokens, user-written text, or URLs containing personal data. No analytics cookies or persistent device identifiers are created.

3. See it arrive

Trigger the action in your app with the project Overview open. Live events updates automatically with event names and counts for the last 24 hours. Allow a few seconds for batching and the next refresh.

Once events appear, create a dashboard and add an Insight. Start with an event count, a trend, or a breakdown by one of your properties.

If nothing arrives, check the ingest key, project status, and outgoing request to https://api.counted.dev/v1/events. A receipt reports accepted, deduplicated, and rejected events. Network blockers and exhausted workspace quotas can prevent collection.

What you can measure today

Event counts, unique visits, trends, property breakdowns, and ordered visit funnels. Visits group temporary activity; they do not count distinct people.

Distinct-person or account analytics, cross-visit retention, and sums of arbitrary numeric properties are not available yet. Sending an ID or a number does not enable those analyses. Do not collect an identifier solely for an unavailable query.

For API integrations, GET /v1/projects/{projectId}/schema lists observed events, dimensions, declared measures, and executable capabilities. Only listed measures can be summed; an empty measures list means no numeric sums are available.

Go further when you need to

React, Python, Go, and Rust SDKs · HTTP, service keys, and anonymous provisioning · API reference

Service keys and OAuth are for querying and managing Counted from other tools. Sending events with an SDK needs only the project’s ingest key.