Take a sneak peak of our new documentation Read More
Last Updated: 11/14/2022, 12:27:40 PM

# Send Events

# Overview

With our Game Telemetry service, you can track and log players' actions within the game by sending an event to be tracked to the game’s streaming pipeline. To track those actions a player session is required, so you must enable your players to create an account (opens new window) in your game before you can use this feature.

# Preparation Before Sending Events

By default, telemetry events will be sent to a game’s streaming pipeline as a batch after a set amount of time. This amount of time should be configured before telemetry events can be sent. Any events that should be sent immediately should also be added to the immediate event list. Here is an example of how to configure your telemetry events.

# Send Events Using the Client SDKs

The following function signature can also be used to send an event. The returned data will be displayed in your data warehouse, where you’ll be able to customize its visualization.

# Send Events Using APIs

NOTE

Event message size is limited to 1 MB.

  1. Use the Protected Save Events: POST - ​/game-telemetry​/v1​/protected​/events (opens new window) endpoint.

  2. Fill in the Request Body.

    • Input the EventNamespace with the game namespace.

    • Input the EventName with the name of the event e.g. player_killed, mission_accomplished.

    • Input the Payload with an arbitrary JSON of the event. Here are some examples of the payload for different use cases:

      • If you want to track player logins and logouts, you can use the following reference for your request body.

      • If you want to track when matchmaking starts and ends, you can use the following reference for your request body.

      • If you want to detect a player’s active status on the server, you can use the following reference for your request body.

    • The Event Timestamp will be generated automatically by the Game Telemetry in ISO 8601 format, e.g. 2021-01-05T05:04:08.775Z.

    • The Event ID will be generated automatically by the Game Telemetry. Upon a successful request, the event will be sent to the designated streaming pipeline for tracking.

# Send Events Using the Client SDKs

With our Game Telemetry service, you can track and log players' actions within the game by sending an event to be tracked to the game’s streaming pipeline. To track those actions a player session is required, so you must enable your players to create an account (opens new window) in your game before you can use this feature.

# Preparation

By default, telemetry events will be sent to a game’s streaming pipeline as a batch after a set amount of time. This amount of time should be configured before telemetry events can be sent. Any events that should be sent immediately should also be added to the immediate event list. Here is an example of how to configure your telemetry events.

# Send Event

The following function signature can also be used to send an event. The returned data will be displayed in your data warehouse, where you’ll be able to customize its visualization.