ETLMCPData Conveyance Works
Log in Start free
Compare

Money units: micros, micro-dollars and decimals

Google Ads, Pinterest and Snapchat send money in millionths; LinkedIn and Meta send decimal strings. What each API returns, and the unit etlmcp's cost uses.

Ad platform APIs do not agree on how to write an amount of money. Google Ads reports cost in micros, Pinterest in micro-dollars and Snapchat in micro-currency: all three are whole numbers of millionths of the ad account's currency, so 4,500,000 means 4.50. LinkedIn and Meta send plain decimal amounts written as strings, such as "19.91833". Mix the two kinds without dividing and one platform's spend looks a million times larger than the other's. etlmcp's cost and conversion_value columns are always in whole units of the ad account's currency: every micro amount is divided by 1,000,000 before it is written, and decimal amounts are read as they are.

What each API sends

Platform Cost field Unit Conversion value
Google Ads metrics.cost_micros Micros, a whole number (INT64) metrics.conversions_value, a plain number (DOUBLE)
Pinterest SPEND_IN_MICRO_DOLLAR Millionths of the advertiser's currency TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR, also millionths
Snapchat spend Micro-currency, millionths of the account's currency conversion_purchases_value, also micro-currency
LinkedIn costInLocalCurrency A decimal (BigDecimal), sent as a string conversionValueInLocalCurrency, the same
Meta spend A numeric string in the account's currency Not compared here

Google Ads

Google's Money type counts an amount in micros, one million to the unit, and pairs it with a three-letter ISO 4217 code. The cost metric follows that rule and is a 64-bit integer. Conversion value does not: metrics.conversions_value is a double in plain units. Inside one Google report, cost needs dividing and conversion value does not, which is an easy place to divide the wrong column or both.

Pinterest

Despite the name, Pinterest's MICRO_DOLLARS columns are not US dollars. Pinterest's analytics reference says that for an account in another currency, the values are microunits of that currency: a British advertiser's spend is in millionths of a pound. Spend and checkout value both follow this rule.

Snapchat

Snapchat's measurement reference lists spend as micro-currency and gives the rate: one unit of local currency equals 1,000,000 micro-currency. The purchase value metrics are micro-currency in the ad account's currency too.

LinkedIn

LinkedIn types costInLocalCurrency, costInUsd and conversionValueInLocalCurrency as BigDecimal. In the JSON response they arrive in quotes, as text with decimal places, while counts such as impressions arrive as bare numbers. A loader that parses only numbers can drop or misread LinkedIn cost for that reason. LinkedIn also offers cost in US dollars next to cost in the account's currency; LinkedIn local currency vs USD covers which one etlmcp keeps.

Meta

Meta's Insights reference types spend as a numeric string, in the currency the ad account uses (account_currency). It is already in whole units, so dividing it is the mistake here.

How etlmcp fills the cost column

Each sync converts amounts as it reads them:

  • Micro amounts (Google Ads cost, Pinterest spend and checkout value, Snapchat spend and purchase value) are read as exact decimals and divided by 1,000,000 before they become a floating-point number. Dividing first, on the decimal, keeps small daily amounts from picking up rounding error.
  • Decimal amounts (LinkedIn cost and conversion value, Meta spend, Microsoft Advertising Spend and Revenue, TikTok spend) are read as exact decimals and stored as they are. LinkedIn rows that share a day and a creative are added up as decimals first.
  • Google conversion value is already in plain units and is not divided.

A value that is not a finite number fails the read rather than storing a wrong figure; on Pinterest, Snapchat, LinkedIn, Meta and TikTok the message is the platform returned a value that is not a number, while Google Ads and Microsoft Advertising word it their own way. An empty value is treated as missing.

Every delivered row has the same columns, whichever platform it came from: cost and conversion_value sit next to currency, along with the ratios cpc, cpm and cpa. In PostgreSQL these money columns are double precision. You never see a micro amount in etlmcp's output, so do not divide cost again: a query that divides it by 1,000,000 turns 250.00 into 0.00025.

The unit is the same across platforms; the currency is not. Each row stays in its own ad account's currency and nothing is converted for you. Before you add spend across accounts, read currency handling across platforms. To read the figures from an AI client, use query_data.

Checks for your own pipeline

If you load some platforms yourself next to etlmcp's tables, run these checks:

  1. Compare one day's spend per platform with the figure in each platform's own ads manager. A ratio near 1,000,000 means a missing division; a ratio near 0.000001 means a double one.
  2. Divide micro amounts once, as close to the source as you can, and name the column for its unit until you do (cost_micros, not cost).
  3. Parse decimal strings with a decimal type, not by casting to an integer.
  4. Keep the currency code on the same row as the amount.

Related

Sources

  1. Money — developers.google.com, checked
  2. metrics — developers.google.com, checked
  3. Get ad account analytics — developers.pinterest.com, checked
  4. Measurement — developers.snap.com, checked
  5. Metrics Available in LinkedIn Ads Reporting - LinkedIn — learn.microsoft.com, checked
  6. Reporting - LinkedIn — learn.microsoft.com, checked
  7. Ad Account, Insights — developers.facebook.com, checked