Sub topic 5
Currency and value: getting money fields right
This chapter assumes you know how GA4 events and parameters work, and that you can build an items array with price and quantity. It covers the two event-level parameters that carry money: currency and value. Most revenue errors in GA4 come from these two fields, not from the items.
What the two parameters do
value is a number. It is the monetary worth of the event. currency is a string. It tells GA4 which currency value (and each item price) is in.
GA4 reads value as a plain number and does not parse currency symbols or thousands separators. The currency field must be a three-letter ISO 4217 code such as USD, EUR, or JPY. Send it in uppercase, because lowercase codes can be rejected or mishandled.
The two fields work as a pair:
- If you send
valuewithoutcurrency, GA4 cannot interpret the amount. Revenue-related metrics for that event can be dropped. - If you send
currencywithoutvalue, nothing breaks, but the event contributes no money. - The currency applies to the whole event, including every item
priceanddiscountinside it.
What `value` should contain
Each event has its own definition of value. Using the wrong one is the second most common mistake.
| Event | `value` should be |
|---|---|
| `view_item` | Unit price of the viewed product (times quantity if you send more than one) |
| `add_to_cart`, `remove_from_cart` | Sum of `price * quantity` for the items added or removed |
| `view_cart`, `begin_checkout` | Sum of `price * quantity` for all items in the cart |
| `add_shipping_info`, `add_payment_info` | Sum of `price * quantity` for the cart items |
| `purchase` | Sum of `price * quantity` for the items, after item discounts |
| `refund` | Amount refunded (omit it and send items for a full refund by transaction) |
For purchase, the tutorial's convention is that value covers the items only. Tax and shipping go in their own tax and shipping parameters. If you add them into value, GA4 will report them as product revenue.
The add_to_cart example from this tutorial shows the arithmetic. Two units at 24.99 give a value of 49.98:
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 49.98,
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
item_brand: 'Acme',
item_category: 'Shoes',
item_variant: 'blue',
price: 24.99,
quantity: 2
}
]
});GA4 does not check that value equals the sum of the items. It records whatever you send. If the two disagree, the event-level revenue and the item-level revenue will disagree in reports, and nothing warns you.
Computing value in code
Compute value from the same data you put in items. This removes a whole class of mismatches. The helper below also rounds to two decimals, which avoids floating-point artifacts such as 49.980000000000004.
function cartValue(items) {
const total = items.reduce(
(sum, item) => sum + item.price * (item.quantity || 1),
0
);
return Math.round(total * 100) / 100;
}
const items = [
{ item_id: 'SKU_1001', item_name: 'Trail Running Shoe', price: 24.99, quantity: 2 },
{ item_id: 'SKU_2002', item_name: 'Trail Socks', price: 9.5, quantity: 1 }
];
gtag('event', 'begin_checkout', {
currency: 'USD',
value: cartValue(items),
items: items
});Here cartValue(items) returns 59.48. The || 1 handles items sent without a quantity, which GA4 treats as one unit.
Zero-decimal currencies such as JPY need no special handling in the event. Send 1500 for 1,500 yen. Do not multiply by 100 as some payment APIs do for minor units. Passing a value in cents (4998 for 49.98 USD) is a frequent bug when the data comes straight from a payment provider.
Number types and formatting
Send value as a JavaScript number, not a string. A string like "49.98" can work in some paths, but a string such as "$49.98" or "1,049.98" will not parse correctly. Use a period as the decimal separator, regardless of the shop's locale. A European store that displays 49,98 € must still send 49.98 with currency: 'EUR'.
Avoid negative values in everything except cases GA4 documents. Do not send a negative value on a purchase to represent a return. Use a refund event instead, covered in a later chapter.
One currency per event
An event has one currency. If your shop sells in several currencies, send the currency the customer actually paid in. GA4 then converts reporting to the property's reporting currency, set in the property's details. The conversion uses daily exchange rates, so the figure in reports for a non-matching currency is an approximation, not the exact amount in your accounting system.
Do not mix currencies inside one items array. All prices in an event must be in the event's currency. If product prices are stored in a base currency but the customer paid in another, convert them before sending, or send the base currency for both fields consistently.
How the fields flow through the funnel
The diagram shows where each money field is set and how it reaches the revenue metrics.
Event-level value feeds metrics such as purchase revenue. Item-level price and quantity feed item revenue. The two paths are independent, which is why a mismatch between them shows up as different totals in different reports.
Common mistakes and fixes
- Missing
currency. Revenue is zero or absent. Add a three-letter uppercase code to every event that carriesvalue. - Value in minor units. Revenue is 100 times too high. Divide payment-provider amounts by 100 for two-decimal currencies before sending.
- Tax or shipping in
value. Product revenue is inflated. Send those astaxandshipping. - Formatted strings. Revenue is zero or wrong. Send a plain number with a period as the decimal separator.
valueignores quantity. Revenue is too low for multi-unit lines. Compute fromprice * quantity.- Value ignores discounts. If you use item
discount, make sure thepriceyou send is the pre-discount unit price and thatvaluereflects the discounted total, or use a consistent convention and document it.
Reporting currency
In the property settings, you choose a reporting currency. GA4 shows all revenue in that currency, regardless of the currencies in individual events. Changing it later does not rewrite history in a way you can rely on, so choose it before you start collecting data and agree on it with finance.
Exercise
A customer in Germany buys two items. Your payment provider returns a total of 12998 (in cents) for the items, which are priced at 49.99 EUR and 80.00 EUR, and the page displays "129,99 €". Which currency and value should you send on the purchase event, and what is wrong with the other two candidate values?
Show answer
Send currency: 'EUR' and value: 129.99 as a number. The provider's 12998 is in minor units and would inflate revenue by 100 times, and it also does not match the item sum (49.99 + 80.00 = 129.99). The displayed string "129,99 €" uses a comma decimal and a symbol, so GA4 cannot parse it as a number.