Docs > Event types > Overview > Resource Events

Resource Events

#

Resource Events

Copy link to clipboard

Use this event to track when players gain (source) or lose (sink) resources like virtual currency and lives.

A “sink” is when a player loses or spends a resource. A “source” is when a player gains or earns a resource.

  • Example A: A player spends one life by starting a game.
  • Example B: A player buys a boost in the game with 100 gold currency.
  • Example C: A player earns a reward of 5 lives for watching an ad.
  • Example D: A player buys a pack of 100 gold currency as an in-app purchase for $0.99 from the store. (The event below is only for the addition of gold to the player’s balance.)
Field Example A Example B Example C Example D
flowType sink sink source source
itemType continuity boost reward purchase
itemId startGame rainbowBoost videoAd goldPack
amount 1 100 5 100
resourceCurrency life gold life gold

Note: You will need to pre-define a list of currencies and itemTypes when you instrument your game. The max amounts of unique resourceCurrency, itemTypes and unique itemIds are 100 each.

#

Optimizing The Sending Of Events

Copy link to clipboard

Resource events should be sent after gameplay is completed by a player, as opposed to every time the player’s balance goes up/down within a game.

For example:

  • If your player gains coins for making matches in a game but loses them every time he hits an obstacle.
  • Then wait until the end of the game to sum up how many coins they earned and lost, and then send that as one event.

Contact support

Any queries about the platform are welcome.

Give article feedback

Let us know what you think about the articles.