Skip to content
smartargs
EarnbackDocumentation

CSV files

Spend that has no API: influencers, sponsorships, a newsletter ad, a network you can only export from. Each row is one day of spend.

"csv": { "enabled": true, "files": ["marketing/spend.csv"] }
Setting Meaning
files CSV files, relative to the project folder.

Format

A header row, then one row per day and campaign. Comma separated, or semicolon separated (as European spreadsheets export it), where spend may use a decimal comma.

date,channel,campaign,country,spend,impressions,clicks
2026-11-01,influencer,streamer-anna,DE,150,,
2026-11-03,newsletter,gamedev-weekly,,80,12000,340
Column Required Meaning
date yes The day, YYYY-MM-DD.
channel yes Your channel name (lower case). To see these players, add a channels rule mapping their GA4 source to the same name.
spend yes Amount in currency (or the config’s currency).
campaign Campaign id and name; defaults to the channel.
country Two-letter country code; empty means “not broken down”, so a country filter shows “–”.
impressions, clicks Counts, when you have them.
app One of the app’s keys; empty uses your only app.
currency Three-letter code; defaults to the config’s currency.

A one-off payment (a sponsorship) is one row on the day you paid, or split over the days it ran if you want daily cost per player to read right.

Players from these channels

Give the channel a trackable link so GA4 can credit its players: a Play Store link with a referrer (https://play.google.com/store/apps/details?id=com.example.game&referrer=utm_source%3Danna%26utm_medium%3Dinfluencer), then a rule:

"channels": [{ "medium": "influencer", "channel": "influencer" }]

The App Store passes no referrer, so iOS players from such links land in Unknown.

Errors

Message Fix
missing the column "date" The first row must name the columns.
"1.11.2026" is not a day like 2026-01-31 Use ISO dates.
CSV file not found The path is relative to the folder with earnback.config.json.