Currency & values
Default currencyโ
EUR for Biosphere (unless you add international markets).
Always include currency on monetary events:
ecommerce: {
currency: 'EUR',
value: 84.00,
/* ... */
}
ISO 4217 formatโ
3 uppercase letters: 'EUR', 'CHF', 'USD', 'GBP'. Not the symbol ('โฌ' is invalid), no lowercase.
How to compute valueโ
value = ฮฃ (item.price ร item.quantity) โ global order coupons
Without shipping or tax on add_to_cart, begin_checkout, view_cart, etc. The purchase event includes shipping and tax as separate fields.
Exampleโ
Cart:
- Cream 42โฌ ร 2 = 84โฌ
- Serum 35โฌ ร 1 = 35โฌ
- Promo code -10โฌ
{
event: 'view_cart',
ecommerce: {
currency: 'EUR',
value: 109.00, // 84 + 35 - 10
coupon: 'SPRING10',
items: [
{ item_id: 'BIO-CRM-001', item_name: 'Cream', price: 42.00, quantity: 2 },
{ item_id: 'BIO-SER-001', item_name: 'Serum', price: 35.00, quantity: 1 }
]
}
}
On purchase, send shipping and tax separately (and value stays the merchandise subtotal):
{
event: 'purchase',
ecommerce: {
transaction_id: 'ORD-2026-00123',
currency: 'EUR',
value: 109.00, // merchandise
tax: 18.17,
shipping: 4.95,
coupon: 'SPRING10',
items: [ /* ... */ ]
}
}
GA4 convention:
value= merchandise revenue. Total paid =value + tax + shipping. This is what GA4 and Meta use to compute ROAS.
Number formattingโ
- Always number, never string:
42.00โ โ"42.00"โ - Period decimal separator, not comma:
42.00โ โ42,00โ - No thousands separator:
1299.50โ โ1,299.50or1 299.50โ - Max 2 decimals (GA4 rounds beyond).
- Always units, not cents:
42.00โฌ, not4200.
Cents โ units conversionโ
If your backend stores prices in cents (Stripe-style), convert before push:
function toAmount(cents) {
return Math.round(cents) / 100;
}
// price: toAmount(4200) โ 42.00
Cart consistencyโ
GA4 will show discrepancies if:
value โ ฮฃ (item.price ร item.quantity)
Tolerance: ยฑ1 cent. If rounding makes this messy, normalize backend-side before pushing.
Tax: included or excluded?โ
Convention for Biosphere (confirm with the agency):
priceandvalue: VAT included (matches what the customer sees on-site).tax: amount of VAT contained in the total.shipping: shipping fee, VAT included.
Stay consistent with the customer's invoice.