Skip to content

Emit browser_family device signal in auction telemetry - #1039

Draft
jevansnyc wants to merge 1 commit into
mainfrom
telemetry-browser-family
Draft

Emit browser_family device signal in auction telemetry#1039
jevansnyc wants to merge 1 commit into
mainfrom
telemetry-browser-family

Conversation

@jevansnyc

Copy link
Copy Markdown
Collaborator

What

Adds a browser_family dimension to auction telemetry. DeviceSignals::derive
now classifies a coarse browser family (chrome, safari, firefox, edge,
opera) from the User-Agent, and the value flows through the auction
observation context onto AuctionEventRow into the Tinybird NDJSON. Adds the
matching browser_family column to the auction_events_raw datasource.

Why

Enables CPM and yield breakdowns by browser (Chrome vs Safari vs Firefox) in the
auction telemetry dashboards. The pipeline already emitted is_mobile and a
bot-vs-real is_known_browser boolean, but nothing identified the browser
family.

Notes

  • UA-string derivation, matching the existing parse_is_mobile /
    parse_platform_class pattern. Check order is Edge, Opera, Firefox, Chrome,
    Safari, because the Edge, Opera, and iOS Chrome/Firefox agents embed
    Chrome/Safari tokens and would otherwise misclassify.
  • Privacy: a low-cardinality family label only; no raw User-Agent leaves the
    edge, consistent with the current device-signal stance.
  • Forward-only: the column is nullable and rows emitted before deploy stay null.

Verification

  • cargo test -p trusted-server-core device and telemetry modules pass,
    including new browser_family unit tests and the NDJSON
    serialization / no-private-ids test.
  • cargo clippy clean on core (native) and trusted-server-adapter-fastly
    (wasm32-wasip1).
  • cargo fmt --all -- --check clean.

Follow-ups (not in this PR)

  • The deployed Tinybird workspace schema needs the same browser_family column
    and a redeploy for ingestion to retain the field.
  • A "CPM by browser" dashboard panel.
  • An autoblog Trusted Server redeploy so the field starts flowing.

Derive a coarse browser family (chrome, safari, firefox, edge, opera) from
the User-Agent in DeviceSignals, next to is_mobile and platform_class. Order
the checks so Edge, Opera, and the iOS Chrome/Firefox agents classify
correctly despite embedding Chrome/Safari tokens.

Carry browser_family through the auction observation context onto
AuctionEventRow so it ships in the Tinybird NDJSON, and add the matching
browser_family column to the auction_events_raw datasource.

The value is a low-cardinality family label only; no raw User-Agent leaves
the edge, consistent with the existing device-signal privacy stance. The
field is forward-only: rows emitted before deploy stay null.
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