Analytics
See how often each flag is evaluated, which variants are served, and how many evaluations fail.
Toggld counts flag evaluations per flag, environment, variant, and reason. Use the counts to confirm that your application reads a flag, to check a rollout's variant mix, and to find errors.
View analytics
On a flag page. The Evaluations panel shows the last 7 days for the selected environment:
- The total number of evaluations.
- The share of evaluations that served each variant.
- The number of evaluations that returned an error, when there are any.
On the Analytics page. Open Analytics in your workspace, then choose a flag, an Environment, and a Range: Last hour, Last 24 hours, or Last 7 days. The page shows evaluations over time and the served variants.
Every role, including readers, can view analytics.
Where the counts come from
| Source | How Toggld counts |
|---|---|
| Remote evaluation: the Node.js SDK in remote mode, browsers, OFREP providers, and MCP evaluation tools | The API counts each single and bulk evaluation of a known flag, including evaluations that end in an error. |
| Node.js SDK in local mode | The SDK counts evaluations in your process and sends batches every 30 seconds and on close(). See Telemetry. |
| Node.js SDK with a flag file | Not counted. |
| Test a user on a flag page | Not counted. It runs in your browser. |
What Toggld stores
Toggld stores grouped counts only. Each count covers one flag, environment, variant, reason, and UTC minute.
Toggld does not store user identities, evaluation contexts, flag values, or metadata in analytics.
By default, Toggld keeps counts for 30 days.
Timing and accuracy
Counts are approximate and can lag behind your traffic:
- The API records counts in the background, after it sends the evaluation response.
- Local SDKs send counts every 30 seconds, so the dashboard can be up to 30 seconds behind, plus processing time.
- During an outage, or when a process crashes, buffered counts can be lost.
- When a buffer is full, new groups are dropped.
If a flag shows no evaluations, check that local SDKs have telemetry turned on and that they flush before they exit. Short scripts must call close() or flushTelemetry().
Read analytics with the API
GET /api/v1/flags/{key}/analytics returns the data for one flag in the key's environment. It requires a management key. The range parameter accepts 1h, 24h, or 7d. The default is 24h.
curl "https://api.toggld.io/api/v1/flags/new-checkout/analytics?range=24h" \
-H "Authorization: Bearer ffk_YOUR_MANAGEMENT_KEY"{
"range": "24h",
"from": "2026-10-30T12:00:00.000Z",
"to": "2026-10-31T12:00:00.000Z",
"total": 1520,
"errors": 3,
"lastEvaluatedAt": "2026-10-31T11:58:00.000Z",
"timeline": [{ "bucketStart": "2026-10-31T11:00:00.000Z", "count": 64 }],
"variants": [{ "variant": "on", "count": 312 }, { "variant": "off", "count": 1205 }]
}Analytics reads have a lower rate limit than other reads: 30 requests per minute per environment.
Send counts from a custom client
If you build your own local evaluator, send grouped counts to POST /v1/telemetry with a secret key or a public token. Toggld takes the workspace and environment from the credential.
Do not report evaluations that the API already counted. Remote evaluations, including OFREP calls from browsers, are counted automatically.
curl https://api.toggld.io/v1/telemetry \
-H "Authorization: Bearer ffk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"sdkInstanceId": "checkout-api-7f3c",
"windowId": "flush-000123",
"rollups": [
{ "flagKey": "new-checkout", "variant": "on", "reason": "SPLIT", "bucketStart": "2026-10-31T12:00:00.000Z", "count": 42 }
]
}'The endpoint returns HTTP 204 when it stores the batch.
| Field | Rules |
|---|---|
sdkInstanceId | 1 to 256 characters. Unique per process. |
windowId | 1 to 256 characters. Unique per batch. |
rollups | 1 to 1,000 entries. |
flagKey | 1 to 256 characters. |
variant | 0 to 256 characters. Use an empty string for an error without a variant. |
reason | An OpenFeature reason, such as STATIC, SPLIT, or ERROR. |
bucketStart | The UTC minute, in exactly the format 2026-10-31T12:00:00.000Z. |
count | A positive integer up to 1,000,000,000. |
Rules for safe retries:
- To retry a batch, send the same
sdkInstanceId,windowId, and payload. Toggld counts each instance and window pair once per environment. - Use a new
windowIdfor each batch of new evaluations. - Toggld drops counts that are older than the retention period or, by default, more than five minutes in the future. It still returns HTTP 204.