Game standard events
Overview
A game standard event is a type of game telemetry that has a predefined structure with associated formats and properties that are ready to use directly from the game SDK. It enables you to see player progression, rewards, and resources directly within AccelByte Gaming Services (AGS) dashboards.
This event is associated with your game titles. It should be used for title-specific information, such as players' mission status, match info, level information, weapon pickups, death reasons, etc. Developers must call event functions and instruments corresponding to your game design.
Mission Events
Mission events are designed to measure the progress of tasks, quests, or collections of objectives.
They aim to answer questions such as:
- Which missions do players favor?
- Which missions did players that churned early on interact with?
- How long do missions take to complete?
- Which missions have a high failure rate?
Although there is an overlap between missions and matches, they are designed as separate events to facilitate extensibility in different directions without complicating comprehension and maintenance.
mission_Started
Use this event to track the start of a mission and its details. It should be triggered when the task is obtained by the player or when the tutorial is started.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the user. |
missionID | string | No | Unique ID of the mission, such as its game asset ID. |
missionType | string | Yes | For categorization purposes, e.g., solo, group, pvp, raid, etc. |
missionInstanceID | string | No | A unique ID generated for each mission attempt. |
missionName | string | Yes | Human-readable or non-localized player-facing name. |
missionLocation | string | Yes | Categorizes the mission. Could be the ID or name of a map. |
missionDifficulty | string | Yes | Optional category for difficulty level. |
mission_Step_Ended
Use this event to track important milestones in lengthy missions with multiple sequential steps, such as multi-step story missions and tutorials.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the user. |
missionID | string | No | Unique ID of the mission. |
missionInstanceID | string | No | Unique ID for the specific mission instance. |
missionStep | integer | No | Step number starting at 1. |
missionStepName | string | Yes | Optional name for understanding the specific mission step. |
mission_Ended
This event should be triggered when a mission reaches an end state. For example, when the mission has been completed or the tutorial ends.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the user. |
missionID | string | No | Unique ID of the mission. |
missionInstanceID | string | No | Unique mission instance ID. |
missionSuccess | bool | No | True if the mission was successful; otherwise, false. |
missionOutcome | string | Yes | Optional subcategory to describe the success or failure. |
Matchinfo Events
Matchinfo
events aim to track both solo gameplay (e.g., stages) and multiplayer matches, including important game-specific parameters and results. This includes information for tracking the start and end of matches, as well as player-specific data.
matchinfo
This event describes the start time when gameplay begins and any match-related parameters.
Field | Type | Optional | Description |
---|---|---|---|
timestamp | timestamp | No | The timestamp of when the match started. |
matchinfoID | string | No | Unique identifier for the match. |
matchID | string | Yes | Match ID from matchmaking system, if available. |
gameMode | string | Yes | Game mode category, e.g., PVP, solo, etc. |
matchDifficulty | string | Yes | Optional category for match difficulty. |
matchinfo_Player
This event details information about an individual player participating in a match.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the player. |
matchinfoID | string | No | Unique identifier for the match. |
matchID | string | Yes | Match ID from matchmaking system, if available. |
team | string | Yes | Player's team designation, e.g., A, B, attacker, defender. |
class | string | Yes | The player's character class. |
rank | string | Yes | The player's rank, if applicable. |
matchinfo_Ended
This event tracks when match gameplay ends and includes the global match result.
Field | Type | Optional | Description |
---|---|---|---|
matchinfoID | string | No | Unique identifier for the match. |
matchID | string | Yes | Match ID from matchmaking system, if available. |
endReason | string | No | Reason the match ended, e.g., victory, failure, abandoned. |
winner | string | Yes | The winning team, if applicable. |
Popup Events
popup_Appear
Use this event to track the appearance of popups, such as context-sensitive tutorials or store offers.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the user. |
popupID | string | No | Unique ID of the popup. |
popupType | string | Yes | Type of popup, e.g., tutorial, offer. |
popupName | string | Yes | Human-readable, non-localized player-facing name of popup. |
Progression Events
entity_Leveled
This event is used to track increases in account-wide stats or progression of entities within the game.
Field | Type | Optional | Description |
---|---|---|---|
entityType | string | No | Type of entity that leveled up. |
userID | string | Yes | Unique ID of the user. |
entityID | string | Yes | ID of the entity that leveled up. |
levelStat | string | Yes | Stat being increased (e.g., level). |
levelChange | integer | Yes | The increase in level. |
levelCurrent | integer | Yes | The level after the increase. |
entity_Dead
Use this event to understand the frequency and circumstances under which entities die or are destroyed.
Field | Type | Optional | Description |
---|---|---|---|
entityType | string | No | Type of entity that died. |
userID | string | Yes | Unique ID of the user. |
entityID | string | Yes | ID of the entity that died. |
deathDay | integer | Yes | In-game day the death occurred. |
deathLocation | string | Yes | The location where the death occurred. |
deathType | string | Yes | The type of death (e.g., self, player, and environment). |
deathSource | string | Yes | Source of the death (e.g., player, NPC). |
Resource Events
resource_Flow
Use this event to track changes to gameplay resources and items.
Field | Type | Optional | Description |
---|---|---|---|
userID | string | No | Unique ID of the user. |
flowType | string | No | The flow type, e.g., sink or source. |
transactionID | string | No | Unique identifier for the transaction. |
transactionType | string | No | Type of transaction (e.g., traded, consumed). |
resourceName | string | No | Name of the item or currency being transacted. |
amount | string | No | The amount of resource transacted. |
endBalance | string | No | The remaining balance after the transaction. |
Send Game Standard Events using the Game SDK (WIP)
The AGS Game SDK supports sending Game Standard Events out of the box in a very simple way. You can call the appropriate functions for each of the events. Below is a brief overview of how to use this feature.
- Unreal Engine
- Unity
Unreal Engine example
FOnlineSubsystemAccelByte* OnlineSubsystem = GetABSubsystem(TestSubsystemName);
const FUniqueNetIdAccelByteUserPtr UserId;
const auto GameStandardEventInterface = OnlineSubsystem->GetGameStandardEventInterface();
bool bIsSent = false;
const int32 LocalUserNum = 0;
// Example: Send Mission Started Event
bIsSent = GameStandardEventInterface->SendMissionStartedEvent(LocalUserNum
, UserId
, FMissionId(TEXT("Test"))
, FMissionInstanceId(FGuid::NewGuid().ToString())
, FAccelByteModelsMissionStartedOptPayload{});
Other example events:
// Send Mission Step Ended Event
bIsSent = GameStandardEventInterface->SendMissionStepEndedEvent(LocalUserNum
, UserId
, FMissionId(TEXT("Tutorial"))
, FMissionInstanceId(FGuid::NewGuid().ToString())
, FMissionStep(2)
, FMissionStepName(TEXT("Tutorial")));
// Send Mission Ended Event
bIsSent = GameStandardEventInterface->SendMissionEndedEvent(LocalUserNum
, UserId
, FMissionId(TEXT("Test"))
, FMissionInstanceId(FGuid::NewGuid().ToString())
, FMissionSuccess(false)
, FMissionOutcome(TEXT("Fail")));
// Send Match Info Event
bIsSent = GameStandardEventInterface->SendMatchInfoEvent(LocalUserNum
, FMatchInfoId(TEXT("TestMatch")));
// Send Resource Flow Event
bIsSent = GameStandardEventInterface->SendResourceFlowEvent(LocalUserNum
, UserId
, EAccelByteFlowType::source
, FAccelByteTransactionId(FGuid::NewGuid().ToString())
, FTransactionType(TEXT("Test"))
, FResourceName(TEXT("Gold"))
, FResourceAmount(TEXT("10"))
, FResourceEndBalance(20));
Unreal Engine SDK APIs
Here is a list of all available functions you can use to send different types of events in Unreal Engine:
- SendMissionStartedEvent(FAccelByteUserId userId, FMissionId missionId, FMissionInstanceId missionInstanceId, FAccelByteModelsMissionStartedOptPayload optionalParameters)
- SendMissionStepEndedEvent(FAccelByteUserId userId, FMissionId missionId, FMissionInstanceId missionInstanceId, FMissionStep missionStep, FMissionStepName missionStepName)
- SendMissionEndedEvent(FAccelByteUserId userId, FMissionId missionId, FMissionInstanceId missionInstanceId, FMissionSuccess missionSuccess, FMissionOutcome missionOutcome)
- SendMatchInfoEvent(FMatchInfoId matchInfoId, FAccelByteModelsMatchInfoOptPayload optionalParameters)
- SendMatchInfoPlayerEvent(FAccelByteUserId userId, FMatchInfoId matchInfoId, FAccelByteModelsMatchInfoPlayerOptPayload optionalParameters)
- SendMatchInfoEndedEvent(FMatchInfoId matchInfoId, FMatchEndReason endReason, FAccelByteModelsMatchInfoEndedOptPayload optionalParameters)
- SendPopupAppearEvent(FAccelByteUserId userId, FPopupEventId popupId, FAccelByteModelsPopupAppearOptPayload optionalParameters)
- SendEntityLeveledEvent(FEntityType entityType, FEntityId entityId, FAccelByteUserId userId, FAccelByteModelsEntityLeveledOptPayload optionalParameters)
- SendEntityDeadEvent(FEntityType entityType, FEntityId entityId, FAccelByteUserId userId, FAccelByteModelsEntityDeadOptPayload optionalParameters)
- SendResourceFlowEvent(FAccelByteUserId userId, EAccelByteFlowType flowType, FAccelByteTransactionId transactionId, FTransactionType transactionType, FResourceName resourceName, FResourceAmount resourceAmount, FResourceEndBalance endBalance)
Unity Example
var gameStandardAnalyticsService = AccelByte.Core.AccelByteSDK.GetClientRegistry().GetGameStandardEvents();
var model = new AccelByte.Models.MissionStartedEventPayload
{
MissionId = new MissionId("mission-id"),
MissionInstanceId = new MissionInstanceId("guid-instance-id"),
OptionalParameters = new MissionStartedOptionalParameters
{
MissionDifficulty = "mission-difficulty",
MissionLocation = "mission-location",
MissionName = "mission-name",
MissionType = "mission-type"
}
};
// Send Mission Started Event
var missionStartedSent = gameStandardAnalyticsService.SendMissionStartedEvent(model);
Other example events:
// Send Mission Step Ended Event
var missionStepEndedSent = gameStandardAnalyticsService.SendMissionStepEndedEvent(
new AccelByteUserId("user-id"),
new MissionId("mission-id"),
new MissionInstanceId("guid-instance-id"),
new MissionStep(2),
new MissionStepEndedOptionalParameters
{
MissionStepName = "mission-step-name"
});
// Send Mission Ended Event
var missionEndedSent = gameStandardAnalyticsService.SendMissionEndedEvent(
new AccelByteUserId("user-id"),
new MissionId("mission-id"),
new MissionInstanceId("mission-instance-id"),
new MissionSuccess(true),
new MissionEndedOptionalParameters
{
MissionOutcome = "mission-outcome"
});
// Send Resource Flow Event
var resourceFlowSent = gameStandardAnalyticsService.SendResourceFlowEvent(
new AccelByteUserId("user-id"),
new ResourceFlowType(FlowType.Sink),
new TransactionId("transaction-id"),
new TransactionType("transaction-type"),
new ResourceName("resource-name"),
new ResourceAmount("resource-amount"),
new ResourceEndBalance(20));
Unity SDK APIs
Here is a list of all available functions you can use to send different types of events in Unity:
- SendMissionStartedEvent(AccelByteUserId userId, MissionId missionId, MissionInstanceId missionInstanceId, MissionStartedOptionalParameters optionalParameters)
- SendMissionStepEndedEvent(AccelByteUserId userId, MissionId missionId, MissionInstanceId missionInstanceId, MissionStep missionStep, MissionStepEndedOptionalParameters optionalParameters)
- SendMissionEndedEvent(AccelByteUserId userId, MissionId missionId, MissionInstanceId missionInstanceId, MissionSuccess missionSuccess, MissionEndedOptionalParameters optionalParameters)
- SendMatchInfoEvent(MatchTimestamp timestamp, MatchInfoId matchInfoId, MatchInfoOptionalParameters optionalParameters)
- SendMatchInfoPlayerEvent(AccelByteUserId userId, MatchInfoId matchInfoId, MatchInfoPlayerOptionalParameters optionalParameters)
- SendMatchInfoEndedEvent(MatchInfoId matchInfoId, MatchEndReason matchEndReason, MatchInfoEndedOptionalParameters optionalParameters)
- SendPopupAppearEvent(AccelByteUserId userId, PopupId popupId, PopupAppearOptionalParameters optionalParameters)
- SendEntityLeveledEvent(EntityType entityType, EntityLeveledOptionalParameters optionalParameters)
- SendEntityDeadEvent(EntityType entityType, EntityDeadOptionalParameters optionalParameters)
- SendResourceFlowEvent(AccelByteUserId userId, ResourceFlowType flowType, TransactionId transactionId, TransactionType transactionType, ResourceName resourceName, ResourceAmount resourceAmount, ResourceEndBalance resourceEndBalance)