Event Taxonomy & Tracking
LogLudo structures analytics around a standardized, high-performance event taxonomy designed for sub-second columnar querying. This guide outlines how to send events, the differences between send_action and send_event, and how the SDK protects your network bandwidth.
The LogLudo Taxonomy
Section titled “The LogLudo Taxonomy”To ensure structured, high-speed aggregation in LogLudo’s analytics engine, the API accepts 8 standardized event categories. Events sent outside of these categories are rejected by the ingestion gateway to prevent schema corruption.
| Category | Typical Usage | Rate-Limit Critical? |
|---|---|---|
session_start |
Automated game launch, hardware stats, cohort data | Yes |
session_end |
Automated game shutdown, duration in seconds, quit state | Yes |
progression |
Level starts/ends, boss defeats, tutorial milestones | Yes |
monetization |
In-app purchases, cosmetic unlocks, virtual currency spent | Yes |
error |
Handled runtime errors, script warnings, crash telemetry | Yes |
gameplay |
Combat actions, weapon firing, jumping, puzzle moves | No |
design |
UI clicks, dialog options selected, settings changed | No |
performance |
Automated 10s room FPS pings, custom load time logs | No |
Sending Telemetry: send_action vs send_event
Section titled “Sending Telemetry: send_action vs send_event”1. LOGLUDO.send_action(_category, _action, _payload) (Recommended)
Section titled “1. LOGLUDO.send_action(_category, _action, _payload) (Recommended)”send_action is the primary method used across your codebase. It enforces clean taxonomy by grouping events under a major category with a descriptive action name:
LOGLUDO.send_action(_category, _action, _payload);_category(String): One of the 8 standard categories above._action(String): A unique identifier for the specific occurrence (e.g.,"level_complete","purchase_skin")._payload(Struct): Key-value data attached to the event.
Example: Progression Tracking
Section titled “Example: Progression Tracking”LOGLUDO.send_action("progression", "world_1_boss", { status: "complete", score: 4250, attempts: 3, difficulty: "hard", time_taken_seconds: 142});Example: Monetization Tracking
Section titled “Example: Monetization Tracking”LOGLUDO.send_action("monetization", "skin_unlocked", { item_id: "knight_armor_gold", currency: "gems", price: 250, current_balance: 50});Example: UI & Settings Tracking
Section titled “Example: UI & Settings Tracking”LOGLUDO.send_action("design", "change_volume", { setting: "master_volume", old_value: 0.8, new_value: 0.5});2. LOGLUDO.send_event(_name, _payload)
Section titled “2. LOGLUDO.send_event(_name, _payload)”send_event is the lower-level dispatch method. When calling send_action("progression", "level_1", payload), the SDK simply attaches action = "level_1" to your payload and calls send_event("progression", payload).
You can call send_event directly if your payload already defines an action property or when emitting custom root-level events:
LOGLUDO.send_event("gameplay", { action: "spell_cast", spell_name: "fireball", mana_cost: 15});Automatic Payload Enrichment
Section titled “Automatic Payload Enrichment”Whenever any event is dispatched, the SDK automatically enriches the payload with key system metadata before queueing:
build_type: EvaluatesGM_build_type. If your game is running directly from the GameMaker IDE, it tags the payload with"build_type": "test". Released builds are tagged with"build_type": "build". This allows the dashboard to easily filter out developer testing data.game_version: ReadsGM_versionconfigured in your GameMaker Project Options.session_id: Links the event to the active player session.- Spatial Scenelytics Data: Automatically extracts coordinates and converts them into normalized Scenelytics structures if
x,y, ortrack_idare provided.
Network Protection & Optimization
Section titled “Network Protection & Optimization”GameMaker games frequently run at 60 FPS or higher. Emitting telemetry carelessly in step events could overwhelm the player’s connection. The LogLudo SDK implements four defensive layers to ensure zero impact on game performance:
1. Token-Bucket Rate Limiter
Section titled “1. Token-Bucket Rate Limiter”The SDK caps event emissions to 20 non-critical events per second:
var _current_sec = current_time div 1000;if (_current_sec != last_event_second) { last_event_second = _current_sec; events_this_second = 0;}events_this_second++;
var _is_critical = (_name == "session_start" || _name == "session_end" || _name == "error" || _name == "progression" || _name == "monetization");if (events_this_second > 20 && !_is_critical) { return; // Drop event due to rate limit!}Critical events (session_start, session_end, error, progression, monetization) always bypass the rate limit.
2. Payload Deduplication
Section titled “2. Payload Deduplication”If your game accidentally emits identical events back-to-back within the same batch (such as holding down a key that triggers an event every frame), the SDK’s deduplication check inspects the pending buffer and drops exact duplicate payloads:
var _is_duplicate = false;var _buffer_len = array_length(event_buffer);var _payload_str = json_stringify(_payload);for(var i = 0; i < _buffer_len; i++) { var _existing = event_buffer[i]; if (_existing.event_name == _name) { if (json_stringify(_existing.payload) == _payload_str) { _is_duplicate = true; break; } }}if (_is_duplicate) return; // Drop exact duplicate3. Buffer Capacity Cap
Section titled “3. Buffer Capacity Cap”The internal memory queue (event_buffer) allows up to 150 queued events. If a player remains offline for an extended period and the buffer exceeds 150 items, low-priority events are safely dropped while critical progression, monetization, and session events are always preserved.
4. Smart Batching & Transmission
Section titled “4. Smart Batching & Transmission”Instead of firing an HTTP request for every single event, the SDK buffers events locally:
- Batch Limit: When
array_length(event_buffer) >= 10,LOGLUDO.flush_events()is triggered automatically. - Batch Slice: Up to 50 events are bundled into a single JSON array payload and dispatched in a single HTTP POST request.
- Locking & Concurrency: While a network request is in flight (
request_id != -1), incoming events queue up safely. Once the HTTP response returns (Other_62), the buffer slices out the delivered events and flushes the remaining queue if needed. - Inactivity Timeout: If fewer than 10 events are queued,
obj_LOGLUDO’s step event automatically flushes the buffer if 60 seconds have passed since the last flush.