API Reference
Analytics
Retrieve contest performance metrics
Analytics
Pull performance metrics and statistics for your contests.
Get Contest Analytics
GET
/api/v1/contests/:contestId/analytics Public or Private API Key
Returns aggregated analytics for a specific contest, including entry counts, views, bonus action completions, and point statistics.
Path Parameters
contestIdstring required The unique contest identifier
Request
bash
curl -X GET https://blitzrocket.com/api/v1/contests/clx1abc123/analytics \
-H "x-api-key: your_api_key_here"
Response
json
{
"success": true,
"data": {
"totalEntries": 1523,
"confirmedEntries": 1489,
"disqualifiedEntries": 12,
"totalViews": 28450,
"totalBonusCompletions": 4567,
"points": {
"total": 45890,
"average": 30.1,
"highest": 890
}
}
}
Response Fields
totalEntriesnumberTotal number of entries in the contest
confirmedEntriesnumberEntries with confirmed email addresses
disqualifiedEntriesnumberNumber of disqualified entries
totalViewsnumberTotal contest page views
totalBonusCompletionsnumberTotal bonus action completions across all entries
points.totalnumberSum of all points across all entries
points.averagenumberAverage points per entry
points.highestnumberHighest point total for a single entry
Usage Notes
- Analytics are computed in real-time from the contest data
- Use these metrics to track contest performance and engagement
- Combine with the leaderboard endpoint for comprehensive dashboards
Example: Analytics Dashboard
javascript
async function getContestDashboard(contestId, apiKey) {
const [analyticsRes, leaderboardRes, contestRes] = await Promise.all([
fetch(`https://blitzrocket.com/api/v1/contests/${contestId}/analytics`, {
headers: { "x-api-key": apiKey },
}),
fetch(`https://blitzrocket.com/api/v1/contests/${contestId}/leaderboard?limit=5`, {
headers: { "x-api-key": apiKey },
}),
fetch(`https://blitzrocket.com/api/v1/contests/${contestId}`, {
headers: { "x-api-key": apiKey },
}),
]);
const [analytics, leaderboard, contest] = await Promise.all([
analyticsRes.json(),
leaderboardRes.json(),
contestRes.json(),
]);
return {
contest: contest.data,
analytics: analytics.data,
topParticipants: leaderboard.data,
conversionRate:
analytics.data.totalViews > 0
? ((analytics.data.totalEntries / analytics.data.totalViews) * 100).toFixed(1)
: "0",
};
}
Error Responses
Common error responses for this endpoint.
| Status | Error | Description |
|---|---|---|
400 | Missing contestId | The contestId path parameter is required |
401 | Invalid API key | API key is missing or invalid |
404 | Contest not found | No contest exists with the given ID |