Last Updated: 8/3/2022, 1:14:37 AM

# Send Event

# 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 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 Event using SDK

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 Event using API

To send an event to the designated streaming pipeline, follow these steps.

  1. Use the Protected Save Events: POST - ​/game-telemetry​/v1​/protected​/events 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 login and logout, 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 successful request, the event will be sent to the designated streaming pipeline for tracking.