Report rounds
The minimum
Section titled “The minimum”Call completeMode() when a round ends, won or lost. Only won is required, and sending nothing else is a good integration.
alldle.completeMode('classic', { won: true });A fuller report
Section titled “A fuller report”// When a round starts (optional: measures time and abandoned rounds)alldle.startMode('classic', { puzzleId: '1172' });
// When the player finishes, won or lostalldle.completeMode('classic', { won: true, attempts: 3, maxAttempts: 6, puzzleId: '1172', resultGrid: '🟨⬜⬜🟩⬜\n🟩🟩🟩🟩🟩',});Each field adds something to your dashboard:
| Field | Adds |
|---|---|
attempts |
Average guesses and the guess distribution |
maxAttempts |
“3/6” rather than “3” |
puzzleId |
Puzzle-by-puzzle difficulty |
durationMs, or calling startMode() |
Time per round |
Calling startMode() |
How many rounds are finished or abandoned |
resultGrid |
Your grid on the share card |
score |
Your own score, stored as it is |
The full list of types and limits is in the API reference. A value out of range refuses the whole round, so send whole numbers, and round durationMs if you measure it yourself.
Puzzle ids
Section titled “Puzzle ids”Send your own id for the puzzle, such as its number. It does two things:
- It defines what counts once. One result is kept per player, mode, puzzle and day, and the first one wins. Without an id, it is one per player, mode and day.
- It names the rows of your puzzle table. Without one, each row reads “Daily puzzle”.
alldle.completeMode('classic', { won: false, attempts: 6, maxAttempts: 6, puzzleId: String(puzzleNumber) });The first argument names the mode: classic, pixel, hard, or whatever your game has. Your numbers are then split by mode.
Declare your modes under SDK Modes on the game’s Edit page. Reporting a mode you have not declared still works, and your SDK page flags it so you can spot a typo.
Keep the names short, at most 40 characters, and stable. classic and Classic are two different modes.
Abandoned rounds
Section titled “Abandoned rounds”Call startMode() when a player actually begins, not on page load, and you will see how many rounds are finished. A player who loads the page and leaves is not an abandoned round.
function onFirstGuess() { alldle.startMode('classic', { puzzleId: currentPuzzleId });}Your emoji grid
Section titled “Your emoji grid”Send the grid exactly as your players already share it. Alldle writes the caption line itself, so yours is dropped. Emoji, digits, spaces and basic separators are kept, up to 12 rows and 400 characters.
alldle.completeMode('classic', { won: true, resultGrid: 'My Game #1172 3/6\n🟨⬜⬜🟩⬜\n🟩🟩⬜🟩⬜\n🟩🟩🟩🟩🟩',});“Come back tomorrow” screens
Section titled ““Come back tomorrow” screens”getDailyStatus() tells you what this player already finished today, so you do not have to keep a record of it yourself.
const status = await alldle.getDailyStatus();if (status?.modes['classic']?.completed) { showComeBackTomorrow();}Checking the result
Section titled “Checking the result”completeMode() returns a promise you can ignore. If you want to look:
const { recorded, linked, error } = await alldle.completeMode('classic', { won: true });| Returned | Meaning |
|---|---|
recorded |
false for a puzzle the player already finished today, and when Alldle refused the result |
linked |
Whether the result is linked to an Alldle account |
error |
Why it was refused. The SDK also warns once in the console, for example when the page is not on your game’s domain |