# What is an offline event queue?

> An offline event queue keeps analytics events on the player device until they can be sent, so a game keeps the data of play sessions without a network.

By Yos Riady. Updated 2026-11-18. Published 2026-11-18. Canonical URL: https://manalens.dev/glossary/offline-event-queue

An offline event queue keeps analytics events on the player's device until they can be sent. If the game has no network, events wait in a file and go out later with their original time. Without a queue, a game loses the events of every session that a player plays offline.

## Key points

- The Godot and Unity SDKs keep unsent events on disk and send them later with their original time.
- The collector accepts app events up to 7 days old, so the SDKs drop older queued events.
- The queue holds 1000 events by default, and the oldest are dropped first.

## How does the queue work in the game SDKs?

The Godot SDK saves events in user://manalens_queue.json. The Unity SDK saves them in Application.persistentDataPath, and on WebGL in PlayerPrefs. Both send every 10 seconds, at 20 queued events, on focus loss and on quit.

After a network error or a 5xx, 408 or 429 response, the SDK keeps the batch and waits about 2, 4, 8 seconds and so on, at most 5 minutes. The queue holds at most 1000 events by default, and the oldest are dropped first. Each event has a message_id, so a retry never counts twice.

Sources: Manalens Godot SDK and Unity SDK documentation.

## How old can a queued event be?

The collector accepts app events up to 7 days old, so the SDKs drop queued events that are older. Events keep their original time, so a session played offline counts on the day it was played.

The web SDK is different. It keeps events in memory, never in browser storage. After a network error, events wait in memory, so a closed tab loses them.

Sources: Manalens app events, Godot SDK, Unity SDK and web SDK documentation.

## What does an example look like?

Example numbers: a player plays for 2 hours on a Steam Deck in offline mode and makes 300 events. They connect again 3 days later. The SDK sends the 300 events in batches, with their original times, and the session counts on the day of play. If they connected 8 days later, the events would be more than 7 days old, and the SDK would drop them.

Sources: worked example; Manalens Godot SDK and Unity SDK documentation.

## Why does the queue matter for indie PC and web games?

PC players play on trains, on handhelds and behind firewalls. Without a disk queue, those sessions vanish, and retention looks worse than it is. Godot's user:// folder and Unity's persistent data path are made for data that must last between runs, which is why the SDKs keep the queue there.

- [How to add analytics to a Godot game](https://manalens.dev/blog/godot-analytics)
- [How to add analytics to a Unity game](https://manalens.dev/blog/unity-analytics-without-gameanalytics)
- [Game tracking plan generator](https://manalens.dev/tools/game-tracking-plan-generator)
- [Best game telemetry tools in 2026](https://manalens.dev/blog/best-game-telemetry-tools)

Sources: Godot Engine documentation: File paths; Unity documentation: Application.persistentDataPath.

## Frequently asked questions

### What happens to events from a player who is offline for more than a week?

The collector accepts app events up to 7 days old. The Godot and Unity SDKs drop queued events that are older than that. So a session played more than 7 days before the next connection is not counted. A session played offline and sent within 7 days counts on the day it was played, with its original time.

### What happens to the queue when a player withdraws consent?

In the Godot and Unity SDKs, withdrawing consent deletes the anonymous ID, the session and the queue of unsent events. The SDK also writes an opt-out marker file and records nothing while that file exists. So events that waited in the queue are not sent after the player says no.

### Does a retried batch count twice?

No. Each event has a message_id, so a retry never counts twice. After a network error or a 5xx, 408 or 429 response, the SDK keeps the batch and waits about 2, 4, 8 seconds and so on, at most 5 minutes. Other 4xx responses drop the batch, and it is not sent again.

## Sources

- [Godot Engine documentation: File paths in Godot projects (read 19 November 2026)](https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html)
- [Unity documentation: Application.persistentDataPath (read 19 November 2026)](https://docs.unity.com/en-us/engine/current/script-reference/unityengine/application/persistentdatapath)

## Related guides

- [How to add analytics to a Godot game](https://manalens.dev/blog/godot-analytics)
- [How to add analytics to a Unity game](https://manalens.dev/blog/unity-analytics-without-gameanalytics)
- [Game tracking plan generator](https://manalens.dev/tools/game-tracking-plan-generator)
- [Game analytics SDK](https://manalens.dev/glossary/sdk)
- [Event](https://manalens.dev/glossary/event)
