Docs > Event types > Event Types, Metrics & Dimensions > Resource Events > Resource Events (Implementation)

Resource Events (Implementation)

The purpose of this article is to expose more examples of custom events in GameAnalytics and how they should be sent, from the planning phase up to aggregation and visualisation part in the tool.

We illustrate the generation of these events with examples from our Unity SDK. The examples can be implemented in any other official GameAnalytics SDK by using the equivalent methods.



Copy link to clipboard

Resource events are divided into two categories: sink and source.

  • For better understanding of how they can be used we propose a scenario for a game in which the source for resources are actual in-app purchases or looting while the spending of resources can be done either in the shop or during combat.
  • Virtual currencies can be anything. In our case we choose gold and silver for in-game transactions and also we mark “grenade” as a “currency” for exposing the space of possibility in this feature.


  • Example of code for creating a source and a sink event with “Grenade” as currency:

GameAnalytics.NewResourceEvent (GAResourceFlowType.Source, "Grenade", 2, "Looting", "BossKilled");

GameAnalytics.NewResourceEvent (GAResourceFlowType.Sink, "Grenade", 1, "Combat", "GrenadeThrow"); 

  • Note: you need to make sure all currencies and item types are declared in the initialising phase. Read more in the dedicated technical documentation associated to the SDK you are using.
  • The tool will automatically generate dashboards for each detected currency to highlight the balance between the sink and the source mechanics in the game.
  • In the next representation we can view the “Grenade” resource dashboard for a date range composed by only one day
  • Each aggregated resource event can also be visualised directly using the explore tool in the same manner as design and progression events.

Contact support

Any queries about the platform are welcome.

Give article feedback

Let us know what you think about the articles.

Document sections