Overview
v2 reporting metrics are delivery numbers (impressions, spend, clicks, conversions, derived rates) rolled up across a hierarchical tree: account → advertiser → campaign → media buy → package. Every request hits a single endpoint and resolves the same tree before joining BigQuery metrics on top.v2 deliberately collapses what was a sprawl of v1 tools (
get_campaign_summary,
export_campaign_data, analyze_tactics, etc.) into one endpoint with a
view switch. The same shape works for dashboards, agent prompts, and BI
exports.The hierarchy
Every metrics request resolves the same four-level tree before joining BigQuery metrics on top:advertiserId narrows to that seat, campaignId narrows to
one campaign within an advertiser, and the system enforces that the campaign
belongs to the advertiser when both are passed.
Available metrics
Every level reports the same metric block:| Metric | Type | Notes |
|---|---|---|
impressions | int | Sum across deduped daily reports |
spend | number | Sum in USD |
clicks | int | |
views | int | Viewable impressions (MRC-viewable subset of impressions, per AdCP). Divide by impressions for viewability rate. |
completedViews | int | Video/audio completions (qualified by view_duration_seconds when set on the goal) |
conversions | int | |
leads | int | |
videoCompletions | int | |
ecpm | number | null | (spend × 1000) / impressions |
cpc | number | null | spend / clicks |
ctr | number | null | clicks / impressions |
completionRate | number | null | completedViews / views |
null when their denominator is zero.
Query parameters
| Param | Type | Default | Notes |
|---|---|---|---|
advertiserId | string | — | Seat ID |
campaignId | string | — | Must belong to advertiserId if both passed |
startDate | YYYY-MM-DD | derived from days | |
endDate | YYYY-MM-DD | today | |
days | int 0..90 | 7 | 0 = full campaign timeframe (summary only) |
view | summary | timeseries | summary | |
breakdown | campaign | mediaBuy | package | — | UI hint only — does not affect data. Required for MCP / agent callers. |
download | bool | false | When true, returns a signed CSV URL |
demo | bool | false | Returns auto-generated demo data — useful for sandbox UIs |
Hierarchical summary (view=summary)
Time-series (view=timeseries)
CSV export (download=true)
Append download=true to either view to generate a CSV in GCS and return a
signed URL:
- The signed URL expires in 7 days.
- CSV columns mirror the JSON shape (one row per leaf for summary, one row per leaf × day for time-series).
- Download is the recommended path for ranges longer than 7 days when
view=timeseries.
Group-by guidance
The endpoint always returns the full hierarchy. The optionalbreakdown query
param is a UI rendering hint consumed by the MCP App reporting view — it
sets the default group-by in the chart and table. The data is identical
regardless. MCP / agent callers (api_call, get_reporting_metrics) are
required to provide it so the rendered output isn’t ambiguous; direct REST
callers may omit it.
Audit logs (related)
Audit logs are a sibling read endpoint for the buyer activity feed:CAMPAIGN, CREATIVE,
MEDIA_BUY, and other resource types. Filterable by startDate / endDate,
advertiserId, campaignId, and resourceTypes. Returns up to 500 logs per
page (default 50) plus a total for pagination.
How delivery data flows
Reporting metrics depend on the sales agent reporting actual delivery back to Scope3. Three transports are supported and chosen at agent registration time via the SALES agent’sreportingType field. See the
Storefront onboarding guide for the
registration syntax — the reporting transports themselves follow the
ADCP optimization & reporting spec.
WEBHOOK (default)
Agent posts ADCP
get_media_buy_delivery-shaped payloads to a Scope3
webhook URL embedded in the original create_media_buy call. Best for
most integrations.BUCKET
Agent writes JSON / JSONL / CSV / Parquet files to S3, GCS, or Azure Blob.
Scope3 watches the path and ingests on landing. Best for high-volume
batch reporting.
POLLING
Scope3 calls the agent’s
get_media_buy_delivery on a DAILY or
MONTHLY schedule. Best for legacy systems without outbound webhooks.media_buy_reporting_data)
and are deduped per (reporting_date, media_buy_id) keeping the most recent
received_at. From there, /reporting/metrics does the math.
Webhook delivery
When a SALES agent is registered withreportingType: WEBHOOK, Scope3 issues
a per-media-buy webhook URL inside the original create_media_buy call. The
agent posts ADCP get_media_buy_delivery-shaped payloads back to that URL on
its own cadence. Every request is signed and timestamped:
| Header | Purpose | ||
|---|---|---|---|
X-Scope3-Signature | HMAC-SHA256 of timestamp + "." + raw-body, hex-encoded, computed with the shared webhook secret. | ||
X-Scope3-Timestamp | RFC3339 timestamp of the request. Receivers MUST reject requests where ` | now − timestamp | ` exceeds 5 minutes to defeat replay. |
X-Scope3-Webhook-Id | Idempotency key. Scope3 deduplicates by this value across retries. |
- The shared secret is provisioned at agent registration and stored in Google Secret Manager alongside the agent’s auth credentials. Treat it as production-grade secret material — never log, commit, or paste it.
- Verify the signature in constant time before parsing the body. Reject unsigned, mistimed, or duplicate requests.
- Rotate the secret on a documented schedule and on any suspected exposure. Scope3 supports a brief overlap window where both old and new secrets validate so in-flight deliveries are not lost.
Access control
- The customer ID is taken from the auth context — buyers can only read metrics for media buys their customer owns.
- When
advertiserIdis provided, the platform double-checks seat access before issuing any BigQuery query. - BigQuery itself filters every query on
customer_idas well, so a missing Postgres ACL cannot leak data.
Demo mode
Pass?demo=true to get a deterministic, multi-advertiser fixture with realistic
campaign and product names. Useful for storybook / sandbox screens without any
seeded data, and for teaching agents how the schema looks before running a real
query. Demo data is capped to a 90-day window.