Sub topic 7
Adding value and currency
This chapter covers the value and currency parameters in GA4. It explains how they turn a count of key events into revenue and lead worth, and which mistakes make that data unreliable. It assumes you can already send a generate_lead or purchase event with gtag.js or Google Tag Manager (GTM). It also assumes you know that an event parameter is a named piece of data attached to an event.
Why value and currency matter
A key event count tells you how many times something happened. It doesn't tell you how much it was worth. Two parameters carry that information:
valueis a number. It is the monetary worth of the event.currencyis a three-letter ISO 4217 code, such asUSD,EURorGBP. It says what moneyvalueis in.
GA4 reports revenue and event value from these parameters. It does not infer them from page content or from any other source. If you leave them out, the event is still counted, but its worth is zero.
The two parameters work as a pair. GA4 documents that currency is required whenever value is sent. Without a currency code, the value may be dropped from revenue reporting.
Value on a sale
For a purchase event, value is the revenue for the order. Google's guidance is that value should be the sum of price × quantity for all items in the items array. Add shipping or tax only if your business decides revenue includes them, and then do so consistently. Don't change the rule partway through a reporting period.
// Order: two items, total 59.98 before shipping
gtag('event', 'purchase', {
transaction_id: 'T_12345',
value: 59.98,
currency: 'USD',
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoes',
price: 29.99,
quantity: 2
}
]
});Here value equals 29.99 × 2. A common error is to send the unit price as value when the quantity is more than 1. The event then reports half the real revenue.
A few rules keep sale values clean:
- Send
valueas a number, not a string. Use59.98, not"$59.98"and not"59,98". - Use a period as the decimal separator and no thousands separator.
- Send the amount after discounts if you want revenue to match what the customer paid.
- Decide up front whether
valueincludes tax, and document it.
Value on a lead
A lead has no price. Nobody paid anything when they submitted the form. If you send no value, key event reports show a count only. That is acceptable, but a value lets you compare lead sources by expected worth and not only by volume.
Use an estimated value. A simple method is:
lead value = close rate × average sale valueFor example, if 10% of leads become customers and the average sale is 250 USD, each lead is worth 25 USD. That is the figure used in the generate_lead example:
// Fire after a lead form is successfully submitted
gtag('event', 'generate_lead', {
currency: 'USD',
value: 25.00
});Treat the number as a modeling assumption and not as revenue. Keep it separate in your reporting vocabulary: "lead value" is an estimate, "revenue" comes from purchase events. If you later mix the two in one metric, you will count the same money twice, once as an estimated lead value and again as a real sale.
You can also use different values for different lead types. A request for a quote might be worth 80 USD and a newsletter signup 2 USD. Send the value that matches the form, and use a consistent parameter name and rule for each.
Sending value through Google Tag Manager
With GTM, the values come from the data layer. The purchase push from the topic plan shows the structure:
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null }); // clear the previous ecommerce object
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'T_12345',
value: 59.98,
currency: 'USD',
items: [
{ item_id: 'SKU_123', item_name: 'Trail Shoes', price: 59.98, quantity: 1 }
]
}
});In the GA4 event tag, set the event name to purchase and turn on sending ecommerce data from the data layer. For a lead, which has no ecommerce object, add value and currency as event parameters on the tag. You can enter fixed values, or you can read them from data layer variables.
Two points deserve attention:
- Push
ecommerce: nullbefore each ecommerce push. Otherwise, fields from an earlier object can merge into the new one and carry over an old value or item. - Make sure the push happens before or at the same time as the trigger event. If the tag fires first, it reads an empty variable and sends no value.
Where value shows up in GA4
The numbers appear in different places depending on the event.
| Source | Where it appears | Notes |
|---|---|---|
| `purchase` `value` | Total revenue, Purchase revenue | Standard ecommerce reports use it |
| `generate_lead` `value` | Event value, Key event value | Not counted as purchase revenue |
| Other events with `value` | Event value | You must register them to use them in some reports |
Pay attention to this difference. A purchase event feeds the revenue metrics. A lead event with a value contributes to key event value, but it does not become purchase revenue. That is why estimated lead value does not inflate your sales figures, as long as you send it on generate_lead and not on purchase.
Currency handling
Each event can carry its own currency. GA4 reports in the currency you set for the property, which is in the property details under Admin. When an event arrives in a different currency, GA4 converts it to the property currency, using the exchange rate at the time of processing.
This produces several practical rules:
- Always send
currencywithvalue. - Send a valid uppercase code.
usdorUS$can fail. - If your store sells in several currencies, send the real currency of each order and let GA4 convert. Don't convert it yourself and send the result under the original code.
- Expect small differences between GA4 revenue and your accounting system. Exchange rates, refunds and tax rules differ.
If you change the property currency in Admin, only new data is reported in the new currency. Historical reports keep what was recorded. Make that change deliberately and note the date.
Zero, missing and refunded values
Values behave differently when they are empty:
- A
valueof0is a real number. It counts as a sale or lead worth nothing, for example a free order. - A missing
valueis not the same as zero. The event is counted, and the worth is simply absent. - A negative value is not a refund. To report a refund, send the
refundevent with the originaltransaction_idand the amount.
gtag('event', 'refund', {
transaction_id: 'T_12345',
value: 59.98,
currency: 'USD'
});For a partial refund, send only the refunded items or the partial amount.
Using a variable value
When the value is not fixed, read it from the page or the order, and never hard-code it. In a browser, validate the number before sending it:
function sendPurchase(order) {
var value = Number(order.total);
if (!isFinite(value) || value < 0) {
return; // do not send a broken value
}
gtag('event', 'purchase', {
transaction_id: order.id,
value: Math.round(value * 100) / 100,
currency: order.currency,
items: order.items
});
}The function rejects NaN and negative totals. It also rounds to two decimals, which avoids values such as 59.980000000000004 from floating point arithmetic. Note that some currencies, such as JPY, have no decimal places. Rounding to two places is still safe there, but the amount should be a whole number.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Revenue is zero but purchases are counted | `value` or `currency` missing | Send both parameters |
| Revenue is half the real amount | Unit price sent as `value` with quantity above 1 | Multiply price by quantity |
| Revenue is doubled | The event fires twice with no `transaction_id` dedupe | Send a unique `transaction_id` and fire once |
| Value shows as 0 for leads | Value sent as a string with a symbol | Send a plain number |
| Lead value inflates revenue | Lead value sent on `purchase` | Send it on `generate_lead` |
| Strange value from one order | Old ecommerce object merged in GTM | Push `ecommerce: null` first |
Check each of these in DebugView before you rely on the report. DebugView shows the parameters of each event, so you can read value and currency directly.
A decision flow
Privacy note
Value and currency are not personal data on their own. Do not put customer names, emails or other identifiers into these parameters, or into any parameter next to them. Exact order totals can sometimes identify a person in a very small shop, so keep your parameters limited to what reporting needs.
Exercise
A store sells 3 units of an item at 20.00 EUR each. The developer sends value: 20.00 and no currency on the purchase event. List the two problems and give the corrected parameters.
Show answer
The first problem is that value is the unit price, not the order total. With three units it should be 60.00. The second problem is that currency is missing, so GA4 may not report the revenue. The corrected parameters are value: 60.00 and currency: 'EUR', plus a transaction_id and an items array with price: 20.00 and quantity: 3.
Exercise
Your lead form closes 8% of leads, and the average sale is 400 USD. What lead value would you send on generate_lead, and on which event should you not send it?
Show answer
The estimate is 0.08 × 400 = 32 USD, so send value: 32.00 and currency: 'USD' on generate_lead. Do not send it on purchase, because it is an estimate and would be counted as real revenue.