feat(schemas): five missing metric scalars (CPCV, CPM, downloads, units_sold, new_to_brand_units)#3507
Merged
Merged
Conversation
…ts_sold, new_to_brand_units) Adds five scalars production reporting carries today but had no enum entry: - cost_per_completed_view — CTV CPCV pricing scalar - cost_per_thousand — CPM (universal pricing scalar across CTV/display/ audio/DOOH; conspicuous absence next to cost_per_click before this PR) - downloads — IAB-standard scalar for audio/podcast (Podcast Measurement Technical Guidelines 2.x methodology); distinct from views - units_sold — Retail-media commerce scalar; distinct from conversions (one transaction may carry multiple units) - new_to_brand_units — Retail-media count of units sold to first-time buyers; parallel to existing new_to_brand_rate All five added as type:number minimum:0 properties on delivery-metrics.json plus enum entries on available-metric.json. Doc list in optimization-reporting.mdx updated. Closes the missing-scalars sub-item of #3460. Other sub-items already resolved by recent merges: - Closed-vs-open enum: resolved by #3492 (vendor-metric extensions) - completion_rate derived ratio: resolved by drop-carve-out call in #3472 DBCFM cross-check remains as a human follow-up (David Porzelt). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… descriptions Three review fixes per expert feedback on #3507: 1. Rename cost_per_thousand → cpm. Both protocol and product expert independently flagged that pricing-model.json:8 already uses the canonical "cpm" token; calling the scalar cost_per_thousand creates a translation mismatch. Operators say "CPM"; OpenRTB, GAM (eCPM), TTD all use cpm. Now buyers cross-walk pricing_model→reported scalar without a lookup table. 2. Remove real brand names from schema descriptions. delivery-metrics.json embedded a real list (Amazon Ads, Walmart Connect, Roundel, Sam's MAP, Instacart Ads, Target Roundel) that ships in the published spec — playbook policy bars real brand names in schemas. Replaced with neutral phrasing. (Bonus: Roundel IS Target's network, so the dup was confused.) Same for downloads (Megaphone/Art19/Spotify/Apple Podcasts list scrubbed). 3. Tighten descriptions: - cpm: fix operator-precedence prose to (spend / impressions) × 1000; expand channel list to include mobile/web video and native. - units_sold: note attribution windows are platform-specific; sellers SHOULD declare via measurement_windows or measurement_terms rather than encoding in the scalar name (no _14d/_30d sprawl). - new_to_brand_rate (existing field): clarify it's a fraction of conversions/transactions, distinguishing it from the new new_to_brand_units count. - new_to_brand_units: cross-reference the rate field for clarity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds five scalar metrics production reporting carries today but that had no enum entry. Closes the missing-scalars sub-item of #3460.
cost_per_completed_viewcost_per_click/cost_per_acquisitioncost_per_thousanddownloadsviewsunits_soldconversions(one transaction can carry multiple units)new_to_brand_unitsnew_to_brand_rateAll five added as
type: number, minimum: 0properties ondelivery-metrics.jsonplus enum entries onavailable-metric.json. Doc list inoptimization-reporting.mdxupdated.Other sub-items on #3460
vendor_metricssurface anchored on the vendor's brand.json.completion_ratederived ratio — resolved by the drop-carve-out call in feat(schemas): required_metrics filter + missing_metrics accountability #3472's refactor.missing_metricsis the symmetric mirror ofavailable_metricswith no carve-outs; sellers either report ratios or they appear inmissing_metrics.engagements/follows/saves/profile_visitscollide with DBCFMReporting/PerformanceKPI codes). Not a code change.Skipped
viewable_impressions/viewable_rateas scalars — already in theviewabilitynamespace which is in the enum; adding scalars would duplicate. The namespace covers it:required_metrics: ["viewability"]onget_productsmatches products that report viewability data, and the seller emits the fullviewabilityobject on delivery.Backwards compatibility
All additions are optional. Existing reports stay conformant; sellers populate the new fields when applicable.
Test plan
npm run build:schemas— cleannpm run test:schemas— 7/7npm run test:examples— 34/34npm run test:json-schema— 255/255npm run test:composed— 32/32npm run typecheck— cleanCloses #3460.
🤖 Generated with Claude Code