Skip to content

feat(delivery-metrics): viewability.viewed_seconds + reach_window (#4579 partial, #4580)#4618

Merged
bokelley merged 4 commits into
mainfrom
bokelley/delivery-metrics-reach
May 17, 2026
Merged

feat(delivery-metrics): viewability.viewed_seconds + reach_window (#4579 partial, #4580)#4618
bokelley merged 4 commits into
mainfrom
bokelley/delivery-metrics-reach

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 16, 2026

Summary

Two reporting gaps on `core/delivery-metrics.json` flagged by @yvassiliadis, addressed differently than the original proposals:

#4580 — `reach_window` for reach/frequency disambiguation. Added `reach_window { kind: cumulative | period, period?: Duration }` so buyers know whether to sum reported `reach` across delivery rows. Optional but strongly recommended; descriptions on `reach` and `frequency` warn against summing without it.

#4579 — partial. Original issue proposed adding `viewed_seconds`, `attention_seconds`, `attention_score` as flat scalars mirroring the `optimization-goal.json` metric enum. Splitting into three categories instead:

Metric Category Reporting path
`viewed_seconds` Standard, vendor-attested duration Nested into `viewability` block (same `standard` governs threshold; same `measurable_impressions` denominator; same `vendor`)
`attention_seconds` Vendor-defined, no graduated standard `vendor_metric_values` with `metric_id: 'attention_seconds'` — not promoted to flat scalar
`attention_score` Vendor-defined, no graduated standard `vendor_metric_values` with `metric_id: 'attention_score'` — not promoted to flat scalar

The attention split honors the Tier 0 → Tier 1 graduation process in `docs/measurement/taxonomy.mdx` — vendor-specific metrics without MRC-or-equivalent accreditation flow through `vendor_metric_values`, not dedicated delivery-metrics blocks. `optimization-goal.json`'s metric enum description is updated to point reporters at the right path for each metric. Detail in issue comment.

All four additions are optional and additive.

Test plan

  • `npm run build:schemas` (rebuilds dist)
  • `npm run test:schemas` (540 schemas, 7 checks pass)
  • `npm run test:examples` (36 examples pass)
  • `npm run test:json-schema` (260 in-doc JSON blocks pass)
  • `npm run test:composed` (43 composed-schema checks pass)
  • pre-commit (test:unit, typecheck, etc.) green
  • pre-push doc validation (broken-link / MDX parse) green

🤖 Generated with Claude Code

bokelley and others added 3 commits May 16, 2026 14:31
…4579, #4580)

- Add viewed_seconds, attention_seconds, attention_score to delivery-metrics.json — reporting-side counterparts to the same-named optimization-goal metric enum values
- Add reach_window { kind: cumulative|period, period?: Duration } to disambiguate whether reach/frequency are reported as rolling-since-campaign-start or per-period uniques
- Update reach and frequency descriptions to reference reach_window and warn against summing without it
- Update get_media_buy_delivery and get_creative_delivery metrics tables

Additive change, optional fields, no breaking impact on existing implementations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…p attention scalars

Per #4579 follow-up review:

- viewed_seconds nests into the viewability block (same standard governs the in-view threshold; same measurable_impressions denominator; vendor is on the parent)
- attention_seconds and attention_score are NOT added as flat scalars — vendor-specific metrics with no graduated standard belong in vendor_metric_values per measurement/taxonomy.mdx
- optimization-goal.json metric enum description points reporters at the right reporting path for each metric

reach_window work for #4580 unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley changed the title feat(delivery-metrics): attention/duration scalars and reach_window (#4579, #4580) feat(delivery-metrics): viewability.viewed_seconds + reach_window (#4579 partial, #4580) May 17, 2026
…then, doc gaps

Addresses ad-tech-protocol, adtech-product, code-reviewer, and docs-expert
feedback on PR #4618:

- reach_window.kind gains `rolling` (trailing-window uniques) — Nielsen, iSpot,
  GAM, DV360 all ship trailing-N-day reach; previous `period` description was
  wrong for the overlapping-rows case
- if/then constraint enforces `period: Duration` when kind is `period` or
  `rolling`; ajv validation confirms the rejection fires
- viewability table column ordering unified between get_media_buy_delivery and
  get_creative_delivery
- release-notes.mdx 3.1 section gains a delivery-reporting entry
- cross-references added: optimization-reporting.mdx (metric catalog),
  measurement/taxonomy.mdx (delivery facts line), migration/optimization-goals.mdx
  (delivery-side routing note for the three duration/attention metrics)

viewed_seconds nesting in viewability stays — same vendor measures both in
practice; mixing vendors on the same impression population would create
denominator mismatches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant