01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
offline conversions csv
Also: google ads offline conversions, upload conversions to google ads, gclid upload, microsoft ads offline conversions, msclkid upload, bing offline conversions, scheduled conversion upload
p202 conversion offline-export --format google02What you get
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 conversion offline-exportSet flags below; the command updates as you type.
04Flags
8 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --ad-personalizationstring | Google's Ad Personalization column on every line: granted, deniedgranteddenied |
| --ad-user-datastring | Google's Ad User Data column on every line, as your consent banner collected it: granted, deniedgranteddenied |
| --aff-campaign-idstring | Only this campaign's conversions (an id from p202 campaign list) |
| --conversion-namestring | Send every conversion under this conversion action (Google) or goal (Microsoft) name |
| --daysstring | Conversions from the last this many days, 1 to 90 (default 90) |
| --formatstring | The import file: google, google_uploads, microsoftgooglegoogle_uploadsmicrosoft |
| --outputstring | Write the file here instead of to stdout |
| --summarybool | Print how many conversions the file holds and why each other one is left out, instead of the file |
05How it works
Writes the account's conversions as an ad platform's offline conversion import file, for Google Ads (--format google: Data Manager, gclid, gbraid and wbraid; google_uploads: the Uploads template, gclid) or Microsoft Advertising (--format microsoft: msclkid). Only conversions whose click was named (by the postback, pixel, API call, upload or a tracking cookie) are in it, at the value they count for in the account's currency, under each campaign's conversion name (set on Setup › Offline Conversions; --conversion-name names every line). --summary says how many conversions the file holds and why each other one is left out. A schedule that fetches the file by itself is a fetch URL made on that Setup page.
p202 conversion offline-export --format google --output google-ads.csv p202 conversion offline-export --format microsoft --days 7 --summary
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands conversion offline-export --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure, 6 no Pro licence on the install.
{
"path": "p202 conversion offline-export",
"use": "offline-export",
"short": "Conversions as Google Ads' or Microsoft Advertising's offline conversion import CSV",
"long": "Writes the account's conversions as an ad platform's offline conversion import file, for Google\nAds (--format google: Data Manager, gclid, gbraid and wbraid; google_uploads: the Uploads\ntemplate, gclid) or Microsoft Advertising (--format microsoft: msclkid). Only conversions whose\nclick was named (by the postback, pixel, API call, upload or a tracking cookie) are in it, at the\nvalue they count for in the account's currency, under each campaign's conversion name (set on\nSetup › Offline Conversions; --conversion-name names every line). --summary says how many\nconversions the file holds and why each other one is left out. A schedule that fetches the file\nby itself is a fetch URL made on that Setup page.\n\n p202 conversion offline-export --format google --output google-ads.csv\n p202 conversion offline-export --format microsoft --days 7 --summary",
"runnable": true,
"tasks": [
{
"run": "p202 conversion offline-export --format google",
"ui_pages": [
"Setup › Offline Conversions"
],
"phrases": [
"offline conversions csv",
"google ads offline conversions",
"upload conversions to google ads",
"gclid upload",
"microsoft ads offline conversions",
"msclkid upload",
"bing offline conversions",
"scheduled conversion upload"
]
}
],
"flags": [
{
"name": "ad-personalization",
"type": "string",
"default": "",
"usage": "Google's Ad Personalization column on every line: granted, denied",
"allowed_values": [
"granted",
"denied"
],
"required": false
},
{
"name": "ad-user-data",
"type": "string",
"default": "",
"usage": "Google's Ad User Data column on every line, as your consent banner collected it: granted, denied",
"allowed_values": [
"granted",
"denied"
],
"required": false
},
{
"name": "aff-campaign-id",
"type": "string",
"default": "",
"usage": "Only this campaign's conversions (an id from `p202 campaign list`)",
"required": false
},
{
"name": "conversion-name",
"type": "string",
"default": "",
"usage": "Send every conversion under this conversion action (Google) or goal (Microsoft) name",
"required": false
},
{
"name": "days",
"type": "string",
"default": "",
"usage": "Conversions from the last this many days, 1 to 90 (default 90)",
"required": false
},
{
"name": "format",
"type": "string",
"default": "",
"usage": "The import file: google, google_uploads, microsoft",
"allowed_values": [
"google",
"google_uploads",
"microsoft"
],
"required": false
},
{
"name": "output",
"type": "string",
"default": "",
"usage": "Write the file here instead of to stdout",
"required": false
},
{
"name": "summary",
"type": "bool",
"default": "false",
"usage": "Print how many conversions the file holds and why each other one is left out, instead of the file",
"required": false
}
]
}