Import ad cost
AdPix does not read spend from the ad platforms — you give it a CSV. That one file lights up three things: the return-on-ad-spend table by channel, the Marketing Mix Model, and the cost metrics on your lift tests.
What this data unlocks#
AdPix knows your revenue and conversions; it does not know what you paid to get them. Spend is the one input that comes from outside, and three things depend on it:
- The return-on-ad-spend table by channel on this page — cost, revenue, conversions, ROAS and CPA side by side.
- The Marketing Mix Model — it will not run at all without weekly spend per channel.
- Lift tests — a verdict lands without spend, but incremental ROAS and incremental CPA stay empty.
The difference between those two studies is in MMM or Lift.
Where it is, and what state it is in#
The screen is Cost & ROAS. Reach it from the sidebar under Coming soon, or from Admin → Property settings → the Product links card → Cost & ROAS import.
The item is dimmed in the navigation and carries a Soon badge. The import itself is fully live: data really lands, the readiness card really measures it, and both Marketing Mix and Lift read those rows. What is still rough is the ROAS report inside this page — including the fact that it labels every amount with a dollar sign whatever currency you imported.
Reading the page needs report access; importing, editing and deleting need edit access on that property.
Prepare the file#
Two files are on the page. Download template gives you an empty file with the correct header and a guidance block; Download example gives twelve weeks of realistic data across three channels that imports with zero warnings. To see what a healthy file looks like, start from the example.
| Column | Required | Notes |
|---|---|---|
date |
yes | YYYY-MM-DD or RFC3339. One row per week is recommended, dated the week-ending Sunday. Daily rows are accepted and the model sums them into weeks. |
channel |
yes | your ad channel. Maximum 256 characters. |
cost |
yes | spend as a decimal, no currency symbol. Thousands separators are tolerated. Must not be negative. |
source |
no | a sub-source, if you want a finer split. |
campaign |
no | campaign name. |
currency |
no | three-letter ISO-4217. Empty means USD. |
revenue |
no | the ad platform's own reported revenue. For the reported-ROAS view only; it does not change the model fit. |
The header is matched by name, so column order does not matter and extra columns are ignored. Two aliases are accepted: spend for cost, and week or week_ending for date. A line starting with # is a comment and is never read — which is why the downloaded template, guidance block and all, re-imports untouched.
Leave currency empty and the row is stored as USD. That value is hard-coded and does not consult the currency configured on the property. If you spend in anything else, write the currency on every row — otherwise you end up with a property full of dollar rows and the only clean fix is to replace the window.
Import#
Files up to eight megabytes import synchronously. Anything larger is routed automatically to the background importer: the file is queued, processing progress is shown, and you can navigate away.
At the end you get a structured report — Inserted, Updated, Skipped and Total rows, with the error and warning lists by line number. The error card has a Download error report button so you can correct the file against the report itself.
If the imported rows fall outside the date range selected at the top of the page — normal for historical data — AdPix widens the range for you so you can see what landed.
What skips a row and what is only a warning#
| Condition | Result |
|---|---|
| date empty or in an unrecognised format | row skipped |
| channel empty or over the length limit | row skipped |
| cost not a number, or negative | row skipped |
| currency not three letters | row imported, the default currency is used |
| revenue invalid | row imported, revenue ignored |
| date in the future | row imported, warning only |
| unrecognised channel | row imported, the model files it under the other family |
A skipped row does not take the file down; it is counted and reported. Only a parse failure, a size-limit overflow or a database error rolls the whole transaction back, and then nothing is written at all. The complete list of error codes is in CSV formats.
Correcting what you already imported#
The import replaces, it does not accumulate. The uniqueness key is property, date, channel, source and campaign; re-importing the same combination updates cost, currency and revenue in place and creates no duplicate. For most corrections that is the whole answer: hand it the fixed file again.
For heavier corrections there are three more tools on the page:
- The Data grid tab — browse imported rows and edit or delete one at a time. The date identifies the row and cannot be edited; to change a date, delete the row and re-import it.
- Delete / replace window — pick a date range (and optionally a channel) to remove that whole window, or replace it with a corrected CSV in one atomic step. It previews the affected row count before it runs.
- The Restatements card — when a fresh import changes numbers you already had, it lists old cost against new cost. If your ad platform restates past figures, you see the effect here.
Delete window permanently removes every cost row inside the selected range. If you are unsure, run Preview affected rows first and look at the number.
Channel mapping#
The name your ad platform uses for a channel rarely matches the AdPix taxonomy. The Channels tab on this page holds the Channel mapping card: point a raw channel at a canonical channel and a family — for example Google Ads to google in the paid_search family.
There are five families: paid_search, paid_social, display, video and other. Channels are never merged — each keeps its own ROI. The family only puts same-family channels under a shared prior, so a thin channel can borrow strength from its heavier siblings; a channel with no family lands in other and loses that.
The same mapping is what makes the ROAS table line up: spend under its canonical name joins the revenue reported for the matching channel.
Channel mapping only tidies the names of your cost channels. Which channel a visit is reported under is decided by a different, ordered ruleset, described in How a visit's channel is decided.
Cost-data readiness#
At the top of the page, the readiness card runs the same checks against your imported data that the model runs before fitting, and returns a trust tier: Trusted, Directional or Insufficient. Per channel it lists weeks, spend CV, distinct spend levels and whether the channel is identified.
| Check | Bar | If it is not met |
|---|---|---|
| Weeks of history to run | 78 weeks | blocker; the model will not fit |
| Weeks of history for trusted | 104 weeks | warning only; directional at best |
| Per-channel spend CV | 0.30 or more | the channel stays unidentified |
| Distinct spend levels per channel | three | the channel stays unidentified |
| A single currency | one | blocker |
Two practical conclusions follow. First, import your whole history, not just recent months — two years of past data is worth exactly as much the moment it lands. Second, vary budgets deliberately and at different times; spend that is the same every week is mathematically unidentifiable, and no volume of data will fix it.
Once nothing is blocking, Run model now on the same card queues a model run.
Frequently asked questions#
What happens if I leave the currency column empty?
The row is stored as USD. That default is fixed in code and is not read from the property's currency, so if you spend in another currency, fill the currency column explicitly.
I imported the same file twice — do the rows double?
No. The uniqueness key is property, date, channel, source and campaign, and re-importing the same combination updates cost, currency and revenue in place. If one combination appears twice in a single file, the last row wins.
Why is the cost page dimmed in the sidebar with a Soon badge?
Because it is still parked in the Coming soon group of the navigation. The page opens fully and the import really writes data — Marketing Mix and Lift read those exact rows — but the report inside the page is not finished work.
Can I import more than one currency?
Technically yes, but do not. AdPix holds no exchange rates, so totals and ROAS mix currencies, and the model sums the cost column with no regard for which currency a row is in. The readiness card reports it as a blocker and keeps its own run button locked — but queue a run by hand from the Marketing Mix screen and the model will happily fit those mixed numbers and return meaningless ROIs.
Thanks — your feedback helps us improve the docs.