3. Send in-game event data
To enable optimal ad display and model training, it is crucial to send sufficient in-game event and player attribute data to Airflux. This guide details the core principles and implementation steps for data collection using the Airflux SDK.

Understanding Data Collection
Airflux collects data through three primary methods to make the most optimal ad display decisions.
Each type of data is collected at a different time and for a different purpose, so you must provide all three to maximize the performance of the AI model.
In-game event data
Records user actions such as
ORDER_COMPLETEDandACHIEVE_LEVEL.Player Attribute Data
Records the player's current status, such as their
levelorcurrencybalance.Inference Parameters
Records contextual information at the time of an ad request, such as
adTypeoradPlacementId.
1. Send in-game event data
Use the Airflux.TrackEvent() function to record key player actions within your game. The collected event data plays a crucial role in enabling the Airflux AI model to learn player behavior patterns and make optimal decisions.
Detailed Event Guide with Code Examples
The following events are essential for model training. Clearly understand the purpose and timing of collecting each event, and ensure proper implementation for data transmission.
Verification
2. Send player attribute data
Player attribute data provides a crucial snapshot of a player's status at a given time. This data is used to fine-tune player segmentation and personalize ad experiences. There are two primary functions for sending this data: Airflux.SetUser() and Airflux.SetContext().
Player attribute data is only transmitted to the server when an event is tracked or an inference API is called. Ensure this data is set before making any inference API requests.
Send User ID
Send the player's unique User ID when they sign up or sign in. This ensures all subsequent events and attributes are properly linked to that user. The User ID must be sent before the event data.
Send Contextual Data
Airflux.SetContext() is used to pass player attributes that are not tied to a specific event. This is crucial for providing the AI model with a complete snapshot of the player's status, such as their current level or currency balance at app launch.
Frequently Asked Questions
Last updated

