The earn_virtual_currency event
earn_virtual_currency is a GA4 recommended gaming event for in-game economies. You fire it when a player earns soft currency — coins, gems, points — passing virtual_currency_name and value. Paired with spend_virtual_currency, it lets you model the in-game economy: earning and spending balance, currency sinks and faucets, and how the economy relates to real-money purchases.
What this means
earn_virtual_currency is a GA4 recommended gaming event. You fire it when a player earns virtual (in-game) currency, with virtual_currency_name naming the currency and value giving the amount. It is the faucet side of a game economy.
This is explicitly in-game currency — distinct from real-money purchase events, which use purchase with real currency and value.
Modeling the economy
Tracking earn_virtual_currency alongside spend_virtual_currency by currency name reveals whether the economy is balanced. Persistent surpluses suggest weak sinks; persistent deficits suggest grinding. Comparing virtual earning patterns with real-money purchases can show whether the economy nudges players toward buying currency.
- virtual_currency_name: which in-game currency
- value: amount earned
- Faucet side; pair with spend_virtual_currency
How it appears in analytics and logs
An earn_virtual_currency event means a player gained in-game currency. Earning far outpacing spending may signal an inflationary economy with weak sinks.
Diagnostic use case
Model the in-game economy by tracking how much virtual currency players earn, by currency type.
What WebmasterID can help detect
WebmasterID can record economy events first-party so in-game currency flows are measurable without third-party identifiers.
Common mistakes
- Confusing virtual currency value with real-money revenue.
- Tracking earning but not spending, hiding the balance.
- Using inconsistent virtual_currency_name values.
Privacy and accuracy notes
virtual_currency_name and value describe the game economy, not the player. This is in-game currency, not real money or payment data. Educational, not legal advice.
Related pages
- The spend_virtual_currency event
spend_virtual_currency is the sink side of a GA4-tracked in-game economy. You fire it when a player spends soft currency, passing virtual_currency_name, value, and the item_name purchased. With earn_virtual_currency it closes the economy loop, showing where currency drains and which in-game items absorb it — key to balancing faucets against sinks.
- The purchase event and e-commerce
The purchase event records a completed transaction and anchors all e-commerce reporting: revenue, items, and conversion value. It carries a transaction id, a value and currency, and an items array describing what was bought. The discipline is to record the order, not the customer — product and revenue data belong in the event, personal identity does not.
- The level_up event
level_up is a GA4 recommended gaming event for character or account progression — distinct from completing a stage. You fire it when a player advances a level, passing a level number and optionally a character parameter. It measures long-run progression and retention depth, answering how far players advance rather than whether they finished a single stage.
- Event Explorer
Model in-game currency flows.
Sources and verification notes
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.