spend_virtual_currency
RecommendedThis event measures the sale of virtual goods in your app and helps you identify which virtual goods are the most popular.
- Platforms
- web, app
- When it fires
- You send it when the action happens.
Parameters (3)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| value | number | Yes | The value of the virtual currency. | 5 |
| virtual_currency_name | string | Yes | The name of the virtual currency. | Gems |
| item_name | string | No | The name of the item the virtual currency is being used for. | Starter Boost |
Example
gtag.js
gtag('event', 'spend_virtual_currency', {
value: 5,
virtual_currency_name: 'Gems',
item_name: 'Starter Boost',
});GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'spend_virtual_currency',
value: 5,
virtual_currency_name: 'Gems',
item_name: 'Starter Boost',
});