Business Events
Business events capture real-money, in-app purchases (IAP) made by users, including receipt validation on GameAnalytics’ servers.
info
These events must be manually implemented. Refer to the SDK Documentation for code examples specific to your platform.
| Field | Description | Type | Possible Values | Required |
|---|---|---|---|---|
| category | Event category | string | business | Yes |
| cart_type | The location in the game where the purchase was made | string | E.g. shop, end_of_level, tutorial_pop_up | No |
| item_type | The type/category of the item | String | Max 64 characters | Yes |
| item_id | The specific item bought | string | Max 64 characters | Yes |
| amount | The amount of the purchase, in cents | Integer | E.g. 99 (for $0.99) | Yes |
| currency | The currency (real money) used to make the purchase | string | Currency code in ISO 4217 format, e.g. USD, EUR | Yes |
| receipt | The app store receipt | string | See IAP Purchase Validation and specific SDK documentation for more information. | No |
| signature | The purchase validation signature | string | See IAP Purchase Validation and specific SDK documentation for more information. | No |
info
Amount has to be sent as cents of the preferred currency, multiplying the price by 100 and sending the amount as an integer. Note that while the value is stored in US Dollars, the dashboards display the revenue based on the Currency selected in your Personal settings.
Business Event Examples​
| Field | Example A: A user purchases a pack of coins in the shop | Example B: A user purchases extra lives from a prompt at the end of a level | Example C: A user purchases a starter pack during the FTUE |
|---|---|---|---|
| category | business | business | business |
| cart_type | shop | end_of_level | tutorial_prompt |
| item_type | coin_pack | lives | starter_pack |
| item_id | coint_pack_2 | life_pack_3 | starter_pack_7 |
| amount | 99 | 99 | 299 |
| currency | USD | USD | EUR |
info
If a player purchase coins with real-money, send both a Business event and a Resource event (source) to track the economy flow.