LogoLogo
Go to Airflux
  • Welcome to Airflux
  • Airflux Onboarding
    • Airflux Integration
      • 1. Add your app to the dashboard
      • 2. Install the Airflux SDK
      • 3. Send in-game event data
      • 4. Call the Inference API
  • Reporting
  • Airflux Reference
    • How inference works
    • Required event data for Airflux integration
    • Preparing for the App Store Review
    • Unity SDK Reference
Powered by GitBook

Links

  • Need help? Contact Support
  • Question? Contact Sales
On this page
  • Required event data per revenue model
  • Detailed schema per event
  1. Airflux Reference

Required event data for Airflux integration

This section outlines the event data that must be collected and sent using the Airflux SDK to ensure proper AI model training and achieve optimal results.

Required event data per revenue model

Depending on the revenue model of your game, different event data is required for utilizing Airflux. Refer to the table below.

Revenue Model
Required Events

In-app advertising only

AD_IMPRESSION, ACHIEVE_LEVEL, SPEND_CREDITS

In-app purchase only

ACHIEVE_LEVEL, ORDER_COMPLETED, SPEND_CREDITS

In-app advertising + In-app purchase

AD_IMPRESSION, ACHIEVE_LEVEL, ORDER_COMPLETED, SPEND_CREDITS

Note that the Install and Open events are automatically collected by the Airbridge SDK upon installation and no additional setup is needed.

Detailed schema per event

Find the key attributes and code examples for collecting the required event data below.

Ad Impression (IAA-related event)

Attention

The in-app ad revenue data must be collected using the client-side SDK through mediation platform integrations and sent to Airflux.

Track ad impressions when ad is shown to the player and collect relevant data, such as ad type, ad revenue, placement, and more.

For example, when ad revenue is generated after an interstitial ad is shown, call the TrackEvent() function, set the event category to AirfluxCategory.AD_IMPRESSION, and add adType to customAttributes to send interstitial as a value.

Attribute Type
Name
Semantic Attributes Description
Sample Value

Semantic Attribute

Currency

Currency for ad revenue

USD

Semantic Attribute

Value

Ad revenue amount

1.99

Custom Attribute

ad_type

The type of the ad

reward: Rewarded ad interstitial: Interstitial ad banner: Banner ad

Custom Attribute

ad_placement

Ad placement

rw_offline: Offline reward ad rw_get_item: Rewarded ad for obtaining items like weapons, skins, etc. rw_get_coin: Rewarded ad for earning coins rw_get_gem: Rewarded ad for earning gems rw_time_skip: Rewarded ad for reducing recovery time int_next_stage: Interstitial ad that is presented when advancing to the next stage bn_next_stage: Banner ad that is presented when advancing to the next stage

Custom Attribute

stage_type

The type of the stage

main: Main stage promotion: Seasonal promotion stage (updated every 3 months)

Custom Attribute

stage_number

The stage number where interstitial or rewarded ads are presented after Success, Fail, Give-up, or Retry. Otherwise, null is collected.

main: 1, 2, ..., 550 (30 new stages added every months) promotion: 1, 2, ...,100

Custom Attribute

reward_item

The reward earned by the player after engaging with a rewarded ad. For other ad types, null is collected.

coin: Number of coins earned gem: Number of gems earned

Code example

// Example: Ad revenue transmission from AdMob
Airflux.TrackEvent(
    category: AirfluxCategory.AD_IMPRESSION,
    semanticAttributes: new Dictionary<string, object>()
    {
        { AirfluxAttribute.VALUE, 0.01 }, // Required: Ad revenue
        { AirfluxAttribute.CURRENCY, "USD" }, // Required: Currency code
        {
            AirfluxAttribute.AD_PARTNERS, new Dictionary<string, object>()
            {
                {
                    "mopub", new Dictionary<string, object>()
                    {
                        { "app_version", "5.18.0" },
                        { "adunit_id", "12345" },
                        { "adunit_name", "12345" },
                        { "adunit_format", "Banner" },
                        { "id", "12345" },
                        { "currency", "USD" },
                        { "publisher_revenue", 12345.123 },
                        { "adgroup_id", "12345" },
                        { "adgroup_name", "12345" },
                        { "adgroup_type", "12345" },
                        { "adgroup_priority", "12345" },
                        { "country", "kr" },
                        { "precision", "publisher_defined" },
                        { "network_name", "12345" },
                        { "network_placement_id", "12345" },
                        { "demand_partner_data", "12345" },
                    }
                }
            }
        },
    },
    customAttributes: new Dictionary<string, object>()
    {
        { "ad_type", "reward" }, // Ad type (reward, interstitial 등)
        { "ad_placement", "main_banner" }, // Ad placement (SDK 설치 완료 후 ad_context 값에 따른 상세 설명 필요)
        { "stage_type", "Main" }, // Main or promotional stage (Main, Event 등)
        { "stage_number", "1" }, // The stage number where interstitial or rewarded ads are shown after Success, Fail, Give-up, or Retry. Otherwise, null is collected. 
        { "reward_item", new Dictionary<string, object> {{"coin", 10}, {"gem", 20}} } // The reward earned by the player after engaging with a rewarded ad. For other ad types, null is collected.
    }
);
Order Completed (IAP-related event)

Attention

The in-app purchase revenue data must be collected using the client-side SDK and sent to Airflux. There might be a slight gap between the data sent to Airflux and the revenue data provided by vendors.

Track in-app purchases and relevant data such as item information, transaction ID, the purchased amount, the payment currency, and more.

For example, when a dialog is prompted confirming a purchase of an item, call the TrackEvent() function, set the event category to AirfluxCategory.ORDER_COMPLETED, and add AirfluxAttribute.PRODUCT_ID and AirfluxAttribute.PRODUCT_NAME to send information of the purchase item.

The payment currency information (AirfluxAttribute.CURRENCY )and the purchase amount (AirfluxAttribute.VALUE) must be included in the event data for accurate revenue analysis.

Attribute Type
Name
Semantic Attributes Description
Sample Value

Semantic Attribute

Transaction ID

Transaction ID

TXN-20250411-5F3C9A72B1

Semantic Attribute

Currency

Currency for ad revenue

USD

Semantic Attribute

Value

Ad revenue amount

10.99

Semantic Attribute

Product ID

Product ID

1C569KY32P1

Semantic Attribute

Product Name

Product Name

remove_ads: ""Ad Removal"" as a purchase item welcome_pack: Item package for newly acquired players starter_pack: Item package for beginners coin_pack_1: Coin package gem_pack_2: Gem package limited_skin_1: Time-limited skin

Custom Attribute

purchase_route

The source of the purchase

shop: Purchased from the shop popup: Purchased from a pop-up

Code example

Airflux.TrackEvent(
    // StandardCategory
    category: AirfluxCategory.ORDER_COMPLETED, // or "CustomEvent" (CustomCategory)
    // SemanticAttributes
    semanticAttributes: new Dictionary<string, object>()
    {
        { AirfluxAttribute.VALUE, 11 }, // Required: Actual purchase amount
        { AirfluxAttribute.TRANSACTION_ID, "8065ef16-162b-4a82-b683-e51aefdda7d5" }, // Required: Transaction ID
        { AirfluxAttribute.CURRENCY, "USD" }, // Required: Currency code 
        {
            AirfluxAttribute.PRODUCTS, new List<object>()
            {
                new Dictionary<string, object>()
                {
                    { AirfluxAttribute.PRODUCT_ID, "1C569KY32P1" }, // Required, Product ID
                    { AirfluxAttribute.PRODUCT_NAME, "remove_ads" } // Required, Product name (welcome_back, remove_ads, starter_pack ...)
                } 
            }
        }
    },
    // CustomAttributes
    customAttributes: new Dictionary<string, object>()
    {
        { "purchase_route", "shop" } // (Optional) shop / popup
    }
Achieve Level

Track player game progress and how a stage ended.

For example, when a stage ends, call the TrackEvent() function, set the event category to AirfluxCategory.ACHIEVE_LEVEL, and add AirfluxAttribute.stage_type and AirfluxAttribute.stage_number to track the stage type and stage number.

Additionally, use AirfluxAttribute.result to send information on how the stage ended, such as success, fail, giveup, and retry .

Attribute Type
Name
Semantic Attributes Description
Sample Value

Custom Attribute

stage_type

The type of the stage

main: Main stage promotion: Seasonal promotion stage (updated every 3 months)

Custom Attribute

stage_number

The stage number where Success, Fail, Give-up, or Retry occurred.

main: 1, 2, ..., 550 (30 new stages added every months) promotion: 1, 2, ...,100

Custom Attribute

result

The result of the stage

success: Stage completed successfully fail: Stage failed giveup: Stage abandoned retry: Stage retried after failure or exit

Code example

Airflux.TrackEvent(
    // StandardCategory
    category: AirfluxCategory.ACHIEVE_LEVEL, // or "CustomEvent" (CustomCategory)
    // CustomAttributes
    customAttributes: new Dictionary<string, object>()
    {
        { "stage_type": "main"},
        { "stage_number": 13  },
        { "result": "success" }      
    }
);
Spend Credits

Track in-game currency spending and relevant data, such as in-game currency information, spending amount, and more.

For example, when the player spends in-game currency, such as coins and gems, call the TrackEvent() function, set the event category to AirfluxCategory.SPEND_CREDITS and add AirfluxAttribute.item_type and AirfluxAttribute.item_amount to send the in-game currency type and spending amount.

Additionally, use AirfluxAttribute.stage_type and AirfluxAttribute.stage_numberto track the stage type and stage number.

Attribute Type
Name
Semantic Attributes Description
Sample Value

Custom Attribute

item_type

The type of the in-game currency spent

coin gem

Custom Attribute

item_amount

The amount of the in-game currency spent

10, 20

Custom Attribute

stage_type

The type of the stage

main: Main stage promotion: Seasonal promotion stage (updated every 3 months)

Custom Attribute

stage_number

The current stage of the player

main: 1, 2, ~ , 550 (30 new stages added every months) promotion: 1, 2, ~ ,100

Code example

Airflux.TrackEvent(
    // StandardCategory
    category: AirfluxCategory.SPEND_CREDITS, // or "CustomEvent" (CustomCategory)
    // CustomAttributes
    customAttributes: new Dictionary<string, object>()
    {
        { "item_type": "coin" },
        { "item_amount": 100  },
        { "stage_type": "main"},
        { "stage_number" : 13 }
    }
);

PreviousHow inference worksNextPreparing for the App Store Review

Last updated 7 days ago