Edit

Share via


PlayStream events

To ingest data with PlayStream, you can utilize four different APIs: WriteEvents, WritePlayerEvent, WriteCharacterEvent, and WriteTitleEvent.

PlayFabGenerated Events vs UserGenerated Events

There are two types of events available: PlayFabGenerated and UserGenerated. Both event types are player-ordered, meaning that if multiple APIs are called in a specific order, any actions triggered by the events will be executed in the same order as the API calls.

PlayFabGenerated events are created by PlayFab through a normal API call.

UserGenerated events, on the other hand, are created by developers, who define their structure and data, and are specific to their games. These events are fully reflected through real-time analytics tools and unlike standard events, you need some custom code to post them.

UserGenerated events can be classified by entity and can be bound to a player, character, or title. An event entity reference is specified using these two fields:

  • EntityType
  • EntityID

The following is a comparison table between some PlayFabGenerated and UserGenerated events characteristics.

PlayFabGenerated Events UserGenerated Events
Generated by PlayFab Services The developers
Schema Standard schema (defined by PlayFab) Mostly Custom schema (defined by developers)
Reports and templates Used in common reports and templates Not used in reports or templates
Event Namespace V1: "com.playfab"
V2: "events"
V1: "title"
V2: "custom"
How to emit? N/A V1: WriteTitleEvent, WritePlayerEvent, WriteCharacterEvent
V2: WriteEvents

Standard-schema Events vs Custom-schema Events

Within PlayFab, you can utilize both PlayFabGenerated standard-schema and UserGenerated custom-schema events, although the latters are relatively limited in number.

In the following table, you can find examples of these two types of events.

PlayFabGenerated Events UserGenerated Events
Standard Schema player_logged_in
entity_created
client_focus_change
client_session_start
Custom Schema N/A Free-style