p202 report breakdown

Get stats broken down by a dimension (campaign, traffic source, country, landing page, etc.)

Web UIOverview › Campaign OverviewWeb UIAnalyze › KeywordsWeb UIAnalyze › Text AdsWeb UIAnalyze › ReferersWeb UIAnalyze › IPsWeb UIAnalyze › CountriesWeb UIAnalyze › RegionsWeb UIAnalyze › CitiesWeb UIAnalyze › ISP/CarrierWeb UIAnalyze › Landing PagesWeb UIAnalyze › DevicesWeb UIAnalyze › BrowsersWeb UIAnalyze › PlatformsWeb UIAnalyze › Custom Variables
All commands

01Jobs it does

Each one is a real command line. Copy it, or open it in the builder below to change it.

campaign performance

Also: stats per campaign

p202 report breakdown --breakdown campaign
Web UIOverview › Campaign Overview

Keywords report

p202 report breakdown --breakdown keyword
Web UIAnalyze › Keywords

Text Ads report

p202 report breakdown --breakdown text_ad
Web UIAnalyze › Text Ads

Referers report

p202 report breakdown --breakdown referer
Web UIAnalyze › Referers

IPs report

p202 report breakdown --breakdown ip
Web UIAnalyze › IPs

Countries report

p202 report breakdown --breakdown country
Web UIAnalyze › Countries

Regions report

p202 report breakdown --breakdown region
Web UIAnalyze › Regions

Cities report

p202 report breakdown --breakdown city
Web UIAnalyze › Cities

ISP/Carrier report

p202 report breakdown --breakdown isp
Web UIAnalyze › ISP/Carrier

Landing Pages report

p202 report breakdown --breakdown landing_page
Web UIAnalyze › Landing Pages

Devices report

p202 report breakdown --breakdown device
Web UIAnalyze › Devices

Browsers report

p202 report breakdown --breakdown browser
Web UIAnalyze › Browsers

Platforms report

p202 report breakdown --breakdown platform
Web UIAnalyze › Platforms

c1 c2 c3 c4

Also: custom variable breakdown

p202 report breakdown --breakdown c1
Web UIAnalyze › Custom Variables

02What you get

Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.

p202 report breakdown --breakdown campaign --period last30
$ p202 report breakdown --breakdown campaign --period last30
id  name                          Clicks  Clickthroughs  Conversions  Conv %  Revenue  Cost    Profit   ROI %      EPC      CPA      Avg CPC
--  ----------------------------  ------  -------------  -----------  ------  -------  ------  -------  ---------  -------  -------  -------
1   Spring Collection / US        787     787            24           3.0496  3378     356.45  3021.55  847.6785   4.2922   14.8521  0.4529
2   Coffee Subscription / US      544     544            30           5.5147  1116     214.59  901.41   420.0615   2.0515   7.153    0.3945
3   Standing Desk Launch / UK     438     438            8            1.8265  3551     424.30  3126.70  736.9078   8.1073   53.0375  0.9687
4   Project Tool Pro Annual / US  308     308            10           3.2468  4440     499.20  3940.80  789.4231   14.4156  49.92    1.6208
5   Free Trial to Paid / CA       298     298            18           6.0403  522      391.90  130.10   33.1972    1.7517   21.7722  1.3151
7   Holiday Gift Cards / AU       288     288            13           4.5139  1450     119.54  1330.46  1112.9831  5.0347   9.1954   0.4151
6   Bakery Pre-orders / Local     238     238            18           7.563   1380     27      1353     5011.1111  5.7983   1.50     0.1134
Real output · p202 1.9.77 · demo dataexit 0

Profit by campaign

  • Project Tool Pro Annual / US$3,940.80
  • Standing Desk Launch / UK$3,126.70
  • Spring Collection / US$3,021.55
  • Bakery Pre-orders / Local$1,353.00
  • Holiday Gift Cards / AU$1,330.46
  • Coffee Subscription / US$901.41
  • Free Trial to Paid / CA$130.10

Drawn from the JSON output above.

p202 report breakdown --breakdown ppc_account --period last30
$ p202 report breakdown --breakdown ppc_account --period last30
id  name                      Clicks  Clickthroughs  Conversions  Conv %  Revenue  Cost    Profit   ROI %      EPC      CPA      Avg CPC
--  ------------------------  ------  -------------  -----------  ------  -------  ------  -------  ---------  -------  -------  -------
3   Social Ads - Prospecting  970     970            31           3.1959  2956     560.40  2395.60  427.4804   3.0474   18.0774  0.5777
2   Search Ads - Shopping     663     663            26           3.9216  5776     494.29  5281.71  1068.5448  8.7119   19.0112  0.7455
1   Search Ads - Brand        523     523            30           5.7361  1927     719.86  1207.14  167.6909   3.6845   23.9953  1.3764
4   Social Ads - Retargeting  287     287            13           4.5296  574      85.43   488.57   571.8951   2        6.5715   0.2977
5   Newsletter                238     238            15           6.3025  3540     0       3540     0          14.8739  0        0
6   Podcast Sponsorship       220     220            6            2.7273  1064     173     891      515.0289   4.8364   28.8333  0.7864
Real output · p202 1.9.77 · demo dataexit 0
p202 report breakdown --breakdown country --period last30
$ p202 report breakdown --breakdown country --period last30
id  name            Clicks  Clickthroughs  Conversions  Conv %  Revenue  Cost    Profit   ROI %     EPC     CPA      Avg CPC
--  --------------  ------  -------------  -----------  ------  -------  ------  -------  --------  ------  -------  -------
2   United States   1757    1757           79           4.4963  8321     938.44  7382.56  786.6843  4.7359  11.879   0.5341
3   United Kingdom  451     451            10           2.2173  4487     489.10  3997.90  817.3993  9.949   48.91    1.0845
1   Canada          316     316            18           5.6962  1231     374.30  856.70   228.8806  3.8956  20.7944  1.1845
4   Australia       293     293            14           4.7782  1798     119.54  1678.46  1404.099  6.1365  8.5386   0.408
5   Germany         84      84             0            0       0        111.60  -111.60  -100      0       0        1.3286
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 report breakdown

Set flags below; the command updates as you type.

04Flags

30 flags, plus the global flags every command takes.

FlagWhat it does
--aff-campaign-idstringFilter by INTERNAL campaign id (from campaign list), not the public id in tracking URLs
--aff-network-idstringFilter by affiliate network ID
--breakdown, -bstringDimension (rows are one per stored value; clicks without one, e.g. no referer, are in report summary only): campaign, aff_network, ppc_account, ppc_network, landing_page, keyword, country, city, region, browser, platform, device, isp, text_ad, ip, referer, referer_url, device_type, c1, c2, c3, c4, utm_source, utm_medium, utm_campaign, utm_term, utm_content, rotator, rotator_rule (aliases: geo=country, lp=landing_page, network=aff_network, offer=campaign, referrer=referer, referrer_url=referer_url, rule=rotator_rule, source=ppc_account)
campaignaff_networkppc_accountppc_networklanding_pagekeywordcountrycityregionbrowserplatformdeviceisptext_adiprefererreferer_urldevice_typec1c2c3c4utm_sourceutm_mediumutm_campaignutm_termutm_contentrotatorrotator_rulegeo → countrylp → landing_pagenetwork → aff_networkoffer → campaignreferrer → refererreferrer_url → referer_urlrule → rotator_rulesource → ppc_account
--browser-idstringFilter by browser ID (the id of a --breakdown browser row)
--country-idstringFilter by country ID
--device-typestringFilter by device type ID: 1 Desktop, 2 Mobile, 3 Tablet, 4 Bot (the ids of --breakdown device_type rows)
--group-bystringAlias for --breakdown (matches analytics --group-by): campaign, aff_network, ppc_account, ppc_network, landing_page, keyword, country, city, region, browser, platform, device, isp, text_ad, ip, referer, referer_url, device_type, c1, c2, c3, c4, utm_source, utm_medium, utm_campaign, utm_term, utm_content, rotator, rotator_rule (aliases: geo=country, lp=landing_page, network=aff_network, offer=campaign, referrer=referer, referrer_url=referer_url, rule=rotator_rule, source=ppc_account)
campaignaff_networkppc_accountppc_networklanding_pagekeywordcountrycityregionbrowserplatformdeviceisptext_adiprefererreferer_urldevice_typec1c2c3c4utm_sourceutm_mediumutm_campaignutm_termutm_contentrotatorrotator_rulegeo → countrylp → landing_pagenetwork → aff_networkoffer → campaignreferrer → refererreferrer_url → referer_urlrule → rotator_rulesource → ppc_account
--havingstringPost-filter rows: FIELD OP NUMBER, FIELD a metric column or its alias, OP one of >= <= != = > < (e.g. 'total_leads=0', 'roi<0')
--ipstringOnly clicks from this one IP address, IPv4 or IPv6
--isp-idstringFilter by ISP/carrier ID (the id of a --breakdown isp row)
--keywordstringOnly clicks whose keyword contains this text (case-insensitive)
--landing-page-idstringFilter by landing page ID
--limit, -lstringMax results
--method-of-promotionstringOnly direct-link clicks or only landing-page clicks: directlink, landingpage
directlinklandingpage
--min-clicksfloat64Only rows with at least N clicks
--min-costfloat64Only rows with at least $N cost
--offset, -ostringPagination offset
--period, -pstringPeriod: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime
todayyesterdaylast7last14last30last90thismonthlastmonththisyearlastyearalltime
--platform-idstringFilter by platform (OS) ID (the id of a --breakdown platform row)
--ppc-account-idstringFilter by PPC account ID
--ppc-network-idstringFilter by PPC network ID, or none for the clicks with no traffic source
--refererstringOnly clicks whose referring URL contains this text (case-insensitive)
--region-idstringFilter by region ID (the id of a --breakdown region row)
--showstringWhich clicks count (default all): all, real, filtered, filtered_bot, leads; real = not filtered, filtered_bot = filtered as bots, leads = converted
allrealfilteredfiltered_botleads
--sort, -sstringSort by: total_clicks, total_click_throughs, total_leads, total_income, total_cost, total_net, epc, avg_cpc, conv_rate, roi, cpa (aliases: clicks=total_clicks, conversions=total_leads, cost=total_cost, income=total_income, leads=total_leads, net=total_net, profit=total_net, revenue=total_income)
total_clickstotal_click_throughstotal_leadstotal_incometotal_costtotal_netepcavg_cpcconv_rateroicpaclicks → total_clicksconversions → total_leadscost → total_costincome → total_incomeleads → total_leadsnet → total_netprofit → total_netrevenue → total_income
--sort-dirstringSort direction: ASC, DESC
ASCDESC
--text-ad-idstringFilter by text ad ID
--time-fromstringStart: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z)
--time-tostringEnd, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset
--zero-leadsboolOnly rows with cost > 0 and zero conversions (pure waste)

05For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands report breakdown --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
p202 commands report breakdown --json
{
  "path": "p202 report breakdown",
  "use": "breakdown",
  "short": "Get stats broken down by a dimension (campaign, traffic source, country, landing page, etc.)",
  "runnable": true,
  "tasks": [
    {
      "run": "p202 report breakdown --breakdown campaign",
      "ui_pages": [
        "Overview › Campaign Overview"
      ],
      "phrases": [
        "campaign performance",
        "stats per campaign"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown keyword",
      "ui_pages": [
        "Analyze › Keywords"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown text_ad",
      "ui_pages": [
        "Analyze › Text Ads"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown referer",
      "ui_pages": [
        "Analyze › Referers"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown ip",
      "ui_pages": [
        "Analyze › IPs"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown country",
      "ui_pages": [
        "Analyze › Countries"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown region",
      "ui_pages": [
        "Analyze › Regions"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown city",
      "ui_pages": [
        "Analyze › Cities"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown isp",
      "ui_pages": [
        "Analyze › ISP/Carrier"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown landing_page",
      "ui_pages": [
        "Analyze › Landing Pages"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown device",
      "ui_pages": [
        "Analyze › Devices"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown browser",
      "ui_pages": [
        "Analyze › Browsers"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown platform",
      "ui_pages": [
        "Analyze › Platforms"
      ]
    },
    {
      "run": "p202 report breakdown --breakdown c1",
      "ui_pages": [
        "Analyze › Custom Variables"
      ],
      "phrases": [
        "c1 c2 c3 c4",
        "custom variable breakdown"
      ]
    }
  ],
  "flags": [
    {
      "name": "aff-campaign-id",
      "type": "string",
      "default": "",
      "usage": "Filter by INTERNAL campaign id (from `campaign list`), not the public id in tracking URLs",
      "required": false
    },
    {
      "name": "aff-network-id",
      "type": "string",
      "default": "",
      "usage": "Filter by affiliate network ID",
      "required": false
    },
    {
      "name": "breakdown",
      "shorthand": "b",
      "type": "string",
      "default": "",
      "usage": "Dimension (rows are one per stored value; clicks without one, e.g. no referer, are in `report summary` only): campaign, aff_network, ppc_account, ppc_network, landing_page, keyword, country, city, region, browser, platform, device, isp, text_ad, ip, referer, referer_url, device_type, c1, c2, c3, c4, utm_source, utm_medium, utm_campaign, utm_term, utm_content, rotator, rotator_rule (aliases: geo=country, lp=landing_page, network=aff_network, offer=campaign, referrer=referer, referrer_url=referer_url, rule=rotator_rule, source=ppc_account)",
      "allowed_values": [
        "campaign",
        "aff_network",
        "ppc_account",
        "ppc_network",
        "landing_page",
        "keyword",
        "country",
        "city",
        "region",
        "browser",
        "platform",
        "device",
        "isp",
        "text_ad",
        "ip",
        "referer",
        "referer_url",
        "device_type",
        "c1",
        "c2",
        "c3",
        "c4",
        "utm_source",
        "utm_medium",
        "utm_campaign",
        "utm_term",
        "utm_content",
        "rotator",
        "rotator_rule"
      ],
      "value_aliases": {
        "geo": "country",
        "lp": "landing_page",
        "network": "aff_network",
        "offer": "campaign",
        "referrer": "referer",
        "referrer_url": "referer_url",
        "rule": "rotator_rule",
        "source": "ppc_account"
      },
      "required": false
    },
    {
      "name": "browser-id",
      "type": "string",
      "default": "",
      "usage": "Filter by browser ID (the id of a `--breakdown browser` row)",
      "required": false
    },
    {
      "name": "country-id",
      "type": "string",
      "default": "",
      "usage": "Filter by country ID",
      "required": false
    },
    {
      "name": "device-type",
      "type": "string",
      "default": "",
      "usage": "Filter by device type ID: 1 Desktop, 2 Mobile, 3 Tablet, 4 Bot (the ids of `--breakdown device_type` rows)",
      "required": false
    },
    {
      "name": "group-by",
      "type": "string",
      "default": "",
      "usage": "Alias for --breakdown (matches `analytics --group-by`): campaign, aff_network, ppc_account, ppc_network, landing_page, keyword, country, city, region, browser, platform, device, isp, text_ad, ip, referer, referer_url, device_type, c1, c2, c3, c4, utm_source, utm_medium, utm_campaign, utm_term, utm_content, rotator, rotator_rule (aliases: geo=country, lp=landing_page, network=aff_network, offer=campaign, referrer=referer, referrer_url=referer_url, rule=rotator_rule, source=ppc_account)",
      "allowed_values": [
        "campaign",
        "aff_network",
        "ppc_account",
        "ppc_network",
        "landing_page",
        "keyword",
        "country",
        "city",
        "region",
        "browser",
        "platform",
        "device",
        "isp",
        "text_ad",
        "ip",
        "referer",
        "referer_url",
        "device_type",
        "c1",
        "c2",
        "c3",
        "c4",
        "utm_source",
        "utm_medium",
        "utm_campaign",
        "utm_term",
        "utm_content",
        "rotator",
        "rotator_rule"
      ],
      "value_aliases": {
        "geo": "country",
        "lp": "landing_page",
        "network": "aff_network",
        "offer": "campaign",
        "referrer": "referer",
        "referrer_url": "referer_url",
        "rule": "rotator_rule",
        "source": "ppc_account"
      },
      "required": false
    },
    {
      "name": "having",
      "type": "string",
      "default": "",
      "usage": "Post-filter rows: FIELD OP NUMBER, FIELD a metric column or its alias, OP one of >= <= != = > < (e.g. 'total_leads=0', 'roi<0')",
      "required": false
    },
    {
      "name": "ip",
      "type": "string",
      "default": "",
      "usage": "Only clicks from this one IP address, IPv4 or IPv6",
      "required": false
    },
    {
      "name": "isp-id",
      "type": "string",
      "default": "",
      "usage": "Filter by ISP/carrier ID (the id of a `--breakdown isp` row)",
      "required": false
    },
    {
      "name": "keyword",
      "type": "string",
      "default": "",
      "usage": "Only clicks whose keyword contains this text (case-insensitive)",
      "required": false
    },
    {
      "name": "landing-page-id",
      "type": "string",
      "default": "",
      "usage": "Filter by landing page ID",
      "required": false
    },
    {
      "name": "limit",
      "shorthand": "l",
      "type": "string",
      "default": "",
      "usage": "Max results",
      "required": false
    },
    {
      "name": "method-of-promotion",
      "type": "string",
      "default": "",
      "usage": "Only direct-link clicks or only landing-page clicks: directlink, landingpage",
      "allowed_values": [
        "directlink",
        "landingpage"
      ],
      "required": false
    },
    {
      "name": "min-clicks",
      "type": "float64",
      "default": "0",
      "usage": "Only rows with at least N clicks",
      "required": false
    },
    {
      "name": "min-cost",
      "type": "float64",
      "default": "0",
      "usage": "Only rows with at least $N cost",
      "required": false
    },
    {
      "name": "offset",
      "shorthand": "o",
      "type": "string",
      "default": "",
      "usage": "Pagination offset",
      "required": false
    },
    {
      "name": "period",
      "shorthand": "p",
      "type": "string",
      "default": "",
      "usage": "Period: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime",
      "allowed_values": [
        "today",
        "yesterday",
        "last7",
        "last14",
        "last30",
        "last90",
        "thismonth",
        "lastmonth",
        "thisyear",
        "lastyear",
        "alltime"
      ],
      "required": false
    },
    {
      "name": "platform-id",
      "type": "string",
      "default": "",
      "usage": "Filter by platform (OS) ID (the id of a `--breakdown platform` row)",
      "required": false
    },
    {
      "name": "ppc-account-id",
      "type": "string",
      "default": "",
      "usage": "Filter by PPC account ID",
      "required": false
    },
    {
      "name": "ppc-network-id",
      "type": "string",
      "default": "",
      "usage": "Filter by PPC network ID, or none for the clicks with no traffic source",
      "required": false
    },
    {
      "name": "referer",
      "type": "string",
      "default": "",
      "usage": "Only clicks whose referring URL contains this text (case-insensitive)",
      "required": false
    },
    {
      "name": "region-id",
      "type": "string",
      "default": "",
      "usage": "Filter by region ID (the id of a `--breakdown region` row)",
      "required": false
    },
    {
      "name": "show",
      "type": "string",
      "default": "",
      "usage": "Which clicks count (default all): all, real, filtered, filtered_bot, leads; real = not filtered, filtered_bot = filtered as bots, leads = converted",
      "allowed_values": [
        "all",
        "real",
        "filtered",
        "filtered_bot",
        "leads"
      ],
      "required": false
    },
    {
      "name": "sort",
      "shorthand": "s",
      "type": "string",
      "default": "",
      "usage": "Sort by: total_clicks, total_click_throughs, total_leads, total_income, total_cost, total_net, epc, avg_cpc, conv_rate, roi, cpa (aliases: clicks=total_clicks, conversions=total_leads, cost=total_cost, income=total_income, leads=total_leads, net=total_net, profit=total_net, revenue=total_income)",
      "allowed_values": [
        "total_clicks",
        "total_click_throughs",
        "total_leads",
        "total_income",
        "total_cost",
        "total_net",
        "epc",
        "avg_cpc",
        "conv_rate",
        "roi",
        "cpa"
      ],
      "value_aliases": {
        "clicks": "total_clicks",
        "conversions": "total_leads",
        "cost": "total_cost",
        "income": "total_income",
        "leads": "total_leads",
        "net": "total_net",
        "profit": "total_net",
        "revenue": "total_income"
      },
      "required": false
    },
    {
      "name": "sort-dir",
      "type": "string",
      "default": "",
      "usage": "Sort direction: ASC, DESC",
      "allowed_values": [
        "ASC",
        "DESC"
      ],
      "required": false
    },
    {
      "name": "text-ad-id",
      "type": "string",
      "default": "",
      "usage": "Filter by text ad ID",
      "required": false
    },
    {
      "name": "time-from",
      "type": "string",
      "default": "",
      "usage": "Start: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z)",
      "required": false
    },
    {
      "name": "time-to",
      "type": "string",
      "default": "",
      "usage": "End, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset",
      "required": false
    },
    {
      "name": "zero-leads",
      "type": "bool",
      "default": "false",
      "usage": "Only rows with cost > 0 and zero conversions (pure waste)",
      "required": false
    }
  ]
}