Proposal for Conditional Event Drop Rules in Lexicon for Filter-Based Data Governance
Conditional event drop — filter-based Lexicon rules, not all-or-nothing The problem Lexicon's Drop is binary today: drop the entire event/property, or keep all of it. This works when events are cleanly separable (drop a deprecated event, drop a sensitive property), but fails for the much more common case of mixed-quality events — one event name that carries both signal and noise. Concrete example from my project: our app emits Element Click with two tracking layers simultaneously — a generic auto-track that captures button text (Element Value: "Continue", "Back"...), plus an explicit semantic label we added for real analytics (Element Value: "question-financial_goal", "onboarding-strategy-continue"...). Roughly 50% of Element Click events are generic button-text noise; the other 50% are the semantic events our reports depend on. Today I can't do anything useful with this:
Dropping Element Click kills my semantic analytics too
Keeping it all means paying for (and wading through) massive Lexicon clutter
Hiding only cleans the dropdown — events still ingest, still bill
Current workarounds, and why they fall short
- 1.
Backend proxy filtering — requires engineering cycles for every rule change. Data/analytics owners can't iterate without filing a ticket.
- 2.
App-side suppression — same as above, plus a mobile release cycle.
- 3.
Report-level exclusion filters — works at query time but storage + MTU still include the noise.
- 4.
Historical deletion API — 10/month cap, 180-day window, retroactive only.
Common thread: the analyst / data-governance owner can't make governance decisions without engineering. Lexicon was supposed to solve that. Proposed feature A conditional Drop rule in Lexicon:
Drop <event> where <property> <operator> <value(s)>
Modeled on the filter UX already used across Insights / Funnels / Flows — same operators (equals, contains, in, matches regex, is set, etc.), same property-picker UI. Example rules
Drop Element Click where Element Value IN ("Continue", "Pokračovať", "Back") — kills generic button-text noise
Drop API Request where API Endpoint CONTAINS "/healthz" — kills monitoring noise
Drop any event where $app_version_string < "2.0" — stops ingestion from deprecated builds
Drop any event where any property MATCHES an email or credit-card regex — compliance safety net
Desired behavior
Takes effect at ingestion (same as existing Drop)
Reversible via Undrop (same as today)
Rule history logged and auditable (who/when)
Owner-only permission (same as today)
Why it matters
- 1.
Governance by the right role. Data owners can shape Lexicon without engineering gatekeeping.
- 2.
Cost control. Conditional drops actually reduce billable event volume, where today only full-event drops do.
- 3.
PII / compliance safety net. Catch sensitive leaks at ingestion without waiting for a backend deploy.
- 4.
Lexicon becomes the single governance surface instead of half the controls living at ingestion and half in backend proxies scattered across teams.
