Refining Front End Analytics: Quality Strategies and Tools for Developers at Agoda

Akash Gupta16 Nov 2023

Problem

Agoda's front-end analytics records user interactions in web, iOS and Android apps. Developers add each event by hand to one flat table with more than 1500 columns, most of them empty for any single event. With many developers and plain human error, events arrive misnamed, duplicated, missing or with wrong context. A product owner finds the problem only after the feature ships and several days of data have piled up, which delays KPI readouts or pushes decisions onto bad data.

Example from the article: a developer hardcodes an event from the product owner's requirements, ships the feature and waits a few days. If the data is bad, the fix and the wait start again.

Solution in brief

Define every event in a central code repository where the data team reviews it. Generate typed event objects and JSON Schema rules from the definitions. The rules validate events in real time in pre-live and on a sample in production, and a debugging tool makes the feedback readable.

Questions this case answers
  • How to keep hand-instrumented behavioral event data correct and complete when many independent developers add events to one wide shared table
  • How to detect schema violations in a high-volume event stream when validating every event in real time is too expensive
  • How to keep event tracking data trustworthy when many developers add events by hand?
  • How to catch wrong or missing event context before a product owner builds a decision on it?

Tools and methods

  • Central event definitions — code API declaring page, element, action and required context
  • Generated event types — typed objects produced from the definitions
  • UI observers — DOM, SwiftUI and Jetpack Compose tracking on UI elements
  • JSON Schema validation — rules generated from definitions
  • Mimir Chrome extension — internal debugger that highlights validation errors
Continue reading — it's free

Google or a one-time email code. No password.