Echo/Docs

CLI command

activation aha

A product's aha moment: the first actions that best separate the people still active later from those who were not, computed from a web or mobile source's stored events.

Invocation#

Shell
echo-cli activation aha --product <id> --app <web or mobile source> --days <n> --activation-days <n> --retained-after-days <n> --by <name>
echo-cli activation aha runs --product <id>

Inputs and output#

aha writes the run it stored: id, product_id, app_id, since (the start of the window read), activation_days, retained_after_days, retained and churned (how many people it counted in each), candidates, computed_by and computed_at. Each candidate has event_name, retained_rate and churned_rate (the share of retained and of churned people who sent it within their first activation_days), separation (the difference), retained_doers and churned_doers; candidates come most separating first. aha runs writes the product's stored runs, newest first.

State effect#

Both verbs call Echo Web's authenticated /api/analytics/aha with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Aha moment section of the tracking screen computes and lists runs through the same operation, and echo-mcp lists them (echo_list_aha_runs) but cannot compute one. aha reads the source's stored events of the last --days days — a web source's web events or a mobile app's mobile events — and joins every identifier the identity edges and the events link into one person. A person counts only when their first event in the window is at least --retained-after-days old, so everyone counted has had the whole time to return; they are retained when any of their events comes at or after --retained-after-days from their first, and churned otherwise. Their first actions are the event names they sent before --activation-days from their first event. Each run is stored in activation_aha_runs with the days it was asked for, so a later run can be compared with it. Example: echo-cli activation aha --product <id> --app my-product --days 90 --activation-days 3 --retained-after-days 28 --by growth-review.

Refusals#

  • A wrong invocation is refused before anything is sent: "activation takes <every usage, separated by semicolons>; got <words>", "activation aha does not take <flag>; it takes …", "<flag> needs a value" and "activation aha needs <flag>" for each flag the verb needs.
  • Echo Web answers a bad request with "product_id is required: …", "app_id is required: …", "days must be a positive whole number of days: …" (and activation_days, retained_after_days), "retained_after_days <n> is before activation_days <n> ends: retention is read after the first actions", "retained_after_days <n> does not fit in a window of <n> days: no one read could be told retained or churned", "the source <app> has <n> retained and <n> churned people whose first event is at least <n> days old in <n> days; an aha moment compares both, so read a longer window" or "computed_by is required: …"; and not found with "no product has id <id>; echo-cli products lists the ones that exist" or "the source <app> stored no event since <time>; echo-cli tracking quality names the sources that report". The command prints Echo Web's sentence and exits 1.