Skip to main content

Resource Events

Resource events are used to track virtual economy activity - any time players gain or spend currency. They help model currency flow, detect imbalances and evaluate monetization strategies.

info

These events must be manually implemented. Refer to the SDK Documentation for code examples specific to your platform (Unity, Unreal, Roblox, iOS, Android, etc.).

Resource Events Fields

FieldDescriptionTypePossible ValuesRequired
categoryEvent categoryStringresourceYes
flow_typeThe direction of the resource transactionenumsource (player gains)
sink (player spends currency or its deducted)
Yes
item_typeCategory of the item involved in the transactionstringUp to 20 unique items types are allowedNo
item_idSpecific identifier for the itemstringboots_of_speedNo
amountNumber of units added or removedfloat69No
resource_currencyType of virtual currency usedstringUp to 50 unique currencies are allowedYes
info

You will need to define a list of allowed currencies (up to 50) and item types (up to 20) when you implement your game with the GameAnalytics SDK. Visit the specific [SDK integration pages]((/event-tracking-and-integrations/sdks-and-collection-api/sdks-overview) to learn how to define these.

Resource Event Examples

FieldExample A: A user spends a life by starting a game.Example B: A user buys a boost in the game with 100 gold currencyA user earns 55 coins for making a match in a game/levelExample D: A user makes an in-app purchase to buy a pack of 100 gold currency
categoryresourceresourceresourceresource
flow_typesinksinksourcesource
item_typestartGameboostgameplayIAP_purchase
item_idrainbowBoostrewardgoldPack
amount110055100
resource_currencylifegoldcoinsgold
info

There could be scenarios where two events should be triggered for the same action. E.g. For Example D, you should also trigger a Business event to track the in-app purchase transaction. This will give you a full view of your real-money revenue.