Skip to main content

Telemetry Event

Queues named analytics events in the browser and POSTs them as JSON batches to an endpoint you choose. Browser only: nothing here compiles to the RGS, and the RGS never receives these events.

Set Event to a name such as spin, feature_enter or autoplay_stop, optionally Payload to an object of extra fields (a JSON string is accepted), and fire Send. The node queues { event, payload, ts, sessionId }, where ts is the time in ms since the epoch and sessionId is a random 32-character hex id generated once per node while Session Id (blank = generate) is empty. It adds nothing else; set Session Id to reuse a server-side session id instead.

With Batch on (the default) the queue is POSTed as { events: [...] } when it reaches Max Batch Size (default 20), when Flush After (ms) (default 2000) has passed since the first queued event, or when Flush Now fires. With Batch off, or Flush After (ms) at 0, each event posts at once. Requests go to Endpoint URL with Content-Type: application/json and your Headers merged over it, through fetch with keepalive, so a flush during navigation completes.

When the page is hidden — the tab closes or navigates away — whatever is still queued goes out with navigator.sendBeacon so a session's last events survive; that beacon cannot carry Headers. Deleting the node posts its remaining queue once, best effort, and stops updating outputs. The only destination is Endpoint URL: nothing is sent to XGENIA or the RGS, and while it is blank nothing leaves the browser.

Queued, Sent and Failed count events, not batches. Flushed fires after every accepted POST; Send Failed fires, with Error set, when a request is rejected or answers non-2xx, and that batch is dropped rather than retried. An empty Event name or a blank Endpoint URL is counted as a failure too, so a miswire shows in Failed instead of silently sending nothing. The Slot Features guide shows where this node sits among the slot feature nodes.

Inputs​

Actions​

SignalDescription
SendQueues one event stamped with ts and sessionId, using the Event and Payload set in the same update. An empty Event counts as one failure.
Flush NowPosts everything queued now. Does nothing when the queue is empty.

Event​

DataDescription
Event (string)Event name, e.g. spin. Required for each Send; default empty.
Payload (object)Object of extra fields for the event (a JSON string is accepted; anything else becomes {}). Copied at Send time.
Session Id (blank = generate) (string)Session id stamped on every event. Blank (default) generates a random 32-hex id once; set it to reuse your server session id.

Transport​

DataDescription
Endpoint URL (string)URL that receives the JSON batches. Required for anything to leave the browser; while blank every flush counts as failed.
Headers (object)Object of extra request headers, merged over Content-Type: application/json — put an API key here. Not carried by the pagehide beacon.

Batching​

DataDescription
Batch (boolean)Default true: queue and post in batches. false: post each event immediately.
Flush After (ms) (number)Ms after the first queued event before the batch posts. Default 2000; 0 posts at once.
Max Batch Size (number)Events per batch before an immediate post. Default 20; minimum 1.

Outputs​

Counters​

DataDescription
Queued (number)Events waiting in the queue right now.
Sent (number)Cumulative events accepted by the endpoint (2xx), or handed to the pagehide beacon.
Failed (number)Cumulative events dropped: rejected or non-2xx POSTs, an empty Event, a blank Endpoint URL.

Signals​

SignalDescription
FlushedFires after each accepted POST: a 2xx response, or a beacon the browser accepted.
Send FailedFires when a batch fails; Error says why. The batch is dropped, not retried.

State​

DataDescription
Error (string)Last failure message, e.g. Telemetry POST failed: 401; cleared by the next successful send.

Usage​

  1. Add Telemetry Event; set Endpoint URL to your collector and any API key in Headers.
  2. Use one node per event name, or set Event and Payload in the same update that fires Send.
  3. Put round facts in Payload — bet, win, feature name; the node adds only ts and sessionId.
  4. Wire the signals to measure — spin start, feature entry, autoplay stop, big win — into Send.
  5. Fire Flush Now on exit paths and watch Sent and Failed in the editor preview.
caution

The pagehide beacon sends the body alone — no Headers, so no API key. An endpoint that refuses unauthenticated requests loses the last batch of every session.