refund
RecommendedThis event signifies when one or more items is refunded to a user.
- Platforms
- web, app
- When it fires
- You send it when the action happens.
Parameters (7)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| currency | string | Yes* | Currency of the items associated with the event, in 3-letter ISO 4217 format. * If you set value then currency is required for revenue metrics to be computed accurately. | USD |
| transaction_id | string | Yes | The unique identifier of a transaction. | T_12345 |
| value | number | Yes* | The monetary value of the event. * value is typically required for meaningful reporting. If you mark the event as a conversion then it's recommended you set value. * currency is required if you set value. | 7.77 |
| coupon | string | No | The coupon name/code associated with the event. Event-level and item-level coupon parameters are independent. | SUMMER_FUN |
| shipping | number | No | Shipping cost associated with a transaction. | 3.33 |
| tax | number | No | Tax cost associated with a transaction. | 1.11 |
| items | Array<Item> | No* | The items for the event. | - |
Example
gtag.js
gtag('event', 'refund', {
currency: 'USD',
transaction_id: 'T_12345',
value: 7.77,
coupon: 'SUMMER_FUN',
shipping: 3.33,
tax: 1.11,
items: [{ item_id: 'SKU_12345', item_name: 'Stan and Friends Tee', price: 9.99, quantity: 1 }],
});GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'refund',
currency: 'USD',
transaction_id: 'T_12345',
value: 7.77,
coupon: 'SUMMER_FUN',
shipping: 3.33,
tax: 1.11,
items: [{ item_id: 'SKU_12345', item_name: 'Stan and Friends Tee', price: 9.99, quantity: 1 }],
});