One analytics for two platforms: how we synchronized iOS and Android at hh.ru

Andrey Maksimkin6 Oct 2026

Problem

hh.ru ships every feature to an iOS and an Android app and A/B tests it. The analyst needs the same click and screen events from both apps to judge an experiment. In the old flow, iOS generated Swift from analysts' YAML files, while Android developers entered events by hand. That left two sources of truth, undocumented "junk" events in use, per-platform calculations and double work.

Example from the article: a test of an AI-generated cover letter on the application screen. After three weeks the analyst compared, between the two groups, how often applicants received an employer reply.

Solution in brief

The analytics repository is the only source of truth, and each event is one YAML file. CI validates the files and builds one branch per platform. Developers generate Swift or Kotlin code locally from the task number, and a git tag tells CI when the events have shipped.

Questions this case answers
  • How to keep one source of truth for client-side tracking events when several client apps ship the same feature at different times and events were written by hand on some of them
  • How to make tracking events conform to a specification so that analysts do not have to account for per-platform implementation differences
  • How to keep event tracking identical across iOS and Android apps?
  • How to stop undocumented events from appearing in a mobile app?

Tools and methods

  • YAML event specification — one file per event with owner team and typed parameters
  • Code generation (AnalyticsGen for Swift, Gradle task for Kotlin) — typed event classes with a track(...) method
  • CI on the analytics repository — validates files, automerges, rebuilds platform branches
  • Git tags analytics/AN-XXXXX-N — link a generated commit to the analytics task
  • Yandex AppMetrica — receives external events
  • AI agent over the documentation — builds analytical queries from event docs
Continue reading — it's free

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