On this page
What this issue is
The Meta Pixel is a script that reports actions on your site to Meta. On a purchase it sends a Purchase event with two key parameters: value (the order amount) and currency (a three-letter code such as EUR or USD).
This issue happens when value is not a clean number. Typical bad values are "49,90" (comma decimal, common in many European shops), "1,249.00" (thousands separator), "€49.90" (symbol) or "49.90 EUR". The same problem can appear in server events sent through the Conversions API (CAPI), where custom_data.value should also be numeric.
// Bad: formatted strings
fbq('track', 'Purchase', { value: '49,90', currency: 'EUR' });
fbq('track', 'Purchase', { value: '€1,249.00', currency: 'EUR' });
// Good: a number, dot decimal, no separators
fbq('track', 'Purchase', { value: 49.90, currency: 'EUR' });Why it costs you leads or sales
Meta uses purchase value to report ROAS (return on ad spend) and to optimise for value. If the value is misread or missing, your reports show the wrong revenue and the algorithm learns from bad data. A value of "49,90" may be read as 49 or 4990, or be ignored, depending on how it is parsed. You cannot rely on the result, so treat any non-numeric value as a bug.
Example: ten orders worth 500 EUR in total. A comma string can be misread low or high, so Meta shows a different number from your shop.
- Customer paysOrder total 49,90 shown on page
- Data layer / scriptValue read as formatted text
- Pixel / CAPI eventvalue: "49,90"
- Meta reportsWrong or missing revenue and ROAS
The order is fine; the break happens when the amount is formatted for display and passed on as text.
How to check if your site has it
Open Meta Pixel Helper
Install the Meta Pixel Helper browser extension, place a test order (or use your store's test mode), and open the helper on the thank-you page.
Inspect the Purchase event
Click the Purchase event and read the custom parameters. Look at
value: it should be a number like 49.9 with no quotes, comma or symbol. Checkcurrencyis present too.Check the Network tab
In browser DevTools, open Network, filter for
facebook.com/tr, and find the request withev=Purchase. Thecd[value]parameter shows what was sent. A value like49%2C90means a comma was sent.Review Events Manager
In Meta Events Manager, open your Pixel, then Test Events or the Purchase event details. Compare the value Meta shows with your order total.
Check server events
If you use the Conversions API, inspect the payload your server sends and confirm
custom_data.valueis a number, not a string.
How to fix it
The rule is the same everywhere: take the raw order total (not the formatted display text), convert it to a number, and pass it with a dot as the decimal separator and no thousands separator. How you do that depends on your platform.
Find where the Pixel is added
Check your Meta/Facebook plugin, a tag plugin or theme code. Many WooCommerce setups send
$order->get_total(), which is already a plain number; formatted output fromwc_price()is not.Use the raw total
In custom code, use
(float) $order->get_total()and print it withnumber_format($total, 2, '.', ''). Never echowc_price()into the event.Check the currency
Pass
get_woocommerce_currency()ascurrency.
Use the native Meta channel
If you use the Facebook & Instagram sales channel, it sends numeric values for you. Check Settings > Customer events for any extra custom pixel that also sends Purchase.
Fix custom pixel code
In a custom pixel, use
event.data.checkout.totalPrice.amount, which is a number, andevent.data.checkout.currencyCode. Avoidmoneyfiltered strings.In theme Liquid
If you print a value in Liquid, use
{{ total_price | divided_by: 100.0 }}rather than{{ total_price | money }}.
Inspect the data layer variable
In Preview mode, open the purchase event and look at the value in the Data Layer tab. If it shows quotes or a comma, the problem starts upstream.
Add a cleaning variable
Create a Custom JavaScript variable that converts the value to a number (see the code below) and use it as
valuein your Meta Purchase tag.Fix at the source if you can
Ask your developer to push a numeric
ecommerce.valueinto the data layer. This also fixes GA4 and Google Ads.
Find the order total source
In Webflow Ecommerce, the order confirmation page has the total as formatted text. Do not read it from the page text.
Parse before sending
If you must read it from the page, strip symbols and separators and convert it with the function below, then pass the number to
fbq.
Check the Purchase event setup
In your funnel or workflow, find where the Meta Purchase value is set. Make sure it uses the order amount field and not a text field with a currency symbol.
Use custom code if needed
If you fire
fbqfrom custom code in the funnel, apply the parsing function below to the amount first.
Check Marketing Integrations
If you connect the Pixel in Marketing Integrations, Wix sends the value for you. Check the event in Pixel Helper.
Fix custom code
If you added custom code under Settings > Custom code, make sure it passes a number to
fbq, not text read from the page.
Check the built-in Pixel
The built-in Meta Pixel setting handles value for Squarespace Commerce. Test with Pixel Helper.
Fix code injection
If you added
fbqin Code Injection (for example the Order Confirmation page), use the numeric order total, not formatted text.
Keep money as a number
Store and pass amounts as numbers in your backend. Format with commas only for display.
Parse defensively
If a string is unavoidable, use the function below. Round to two decimals.
Fix CAPI too
In your server payload, set
custom_data.valueto a number (for example 49.9) andcurrencyto a code like EUR.
function toNumber(input) {
if (typeof input === 'number') return input;
var s = String(input).replace(/[^0-9,.\-]/g, '');
var lastComma = s.lastIndexOf(',');
var lastDot = s.lastIndexOf('.');
if (lastComma > lastDot) {
// comma is the decimal separator: 1.249,90 or 49,90
s = s.replace(/\./g, '').replace(',', '.');
} else {
// dot is the decimal separator: 1,249.90
s = s.replace(/,/g, '');
}
var n = parseFloat(s);
return isNaN(n) ? 0 : Math.round(n * 100) / 100;
}
fbq('track', 'Purchase', {
value: toNumber('49,90'),
currency: 'EUR'
});How to confirm it's fixed
- Place a new test order and open Meta Pixel Helper on the thank-you page.
- The Purchase event shows
valueas a number with no quotes, comma or symbol. currencyis a valid three-letter code and matches the order.- The
cd[value]in the Network request equals the order total. - Events Manager shows the same amount as your shop after a few minutes.
- If you use CAPI, the server event shows the same numeric value.
Before
- value: "49,90" (string with comma)
- Revenue misread or ignored in Meta
- ROAS and value bidding unreliable
After
- value: 49.9 (number)
- currency: EUR
- Revenue in Meta matches the shop
How to prevent it happening again
- Pass money as numbers in the data layer and backend; format only for display.
- Never read prices from visible page text for tracking.
- Retest Purchase after theme, checkout, plugin or language/locale changes, since locale often switches decimal style.
- Test one order in a comma-decimal locale and one in a dot-decimal locale.
- Review Events Manager value after each release.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. A robot visitor runs your real customer journey on a schedule, and checks the tracking hits sent to Meta. This tells you whether a Purchase hit is sent at the expected step. FunnelGuard stops before payment unless your store's test mode is set up, so it cannot see the real value of a paid order.
Questions people ask
Why is my Meta Pixel purchase value wrong?
The most common cause is that value is sent as a formatted string such as "49,90" or "€49.90" instead of a plain number. Other causes are a missing currency, a duplicate Pixel, or tax and shipping being added differently from your shop. Check the Purchase event in Meta Pixel Helper and compare it with the order total.
Does Meta Pixel accept a comma as a decimal separator?
No, you should not rely on it. Meta expects a number with a dot as the decimal separator, such as 49.90. A comma string can be misread or ignored, so convert the value before sending.
How do I send the purchase value as a number in fbq?
Pass a number, not text: fbq('track', 'Purchase', {value: 49.90, currency: 'EUR'});. If your value comes as a string, convert it first with parseFloat after removing symbols and thousands separators.
How do I check what purchase value Meta received?
Use the Meta Pixel Helper extension on the thank-you page and open the Purchase event. You can also check the cd[value] parameter in the Network tab for the facebook.com/tr request, then compare Events Manager with your shop.
Does the value format matter for Conversions API too?
Yes. In server events, custom_data.value should be a number and currency a three-letter code. A string with a comma can cause the same wrong or missing revenue as with the browser Pixel.
Why does my Meta ROAS show zero or too high?
If the purchase value is dropped, revenue shows as zero. If a comma or thousands separator is misread, it can show far too high or low. Check the value format first, then check for missing currency or duplicate events.
Can FunnelGuard detect a comma in my Purchase value?
Only partly. FunnelGuard checks that the Meta tracking hit fires in your journey, but it stops before payment unless test mode is set up, so you should still check the value yourself in Pixel Helper after a test order.
Related issues
- TRK-172Purchase event missing value/currencyFix guide
- TRK-174PageView firing twice per pageFix guide
- TRK-178event_id missing on browser eventsFix guide
- TRK-179CAPI not deduplicating with browser event (event_id mismatch)Fix guide
- TRK-180CAPI events missing entirelyFix guide
- TRK-175Standard event misspelled ('lead' vs 'Lead')Fix guide