Events & ExportExplainability coverage gate

Explainability coverage gate

Ask this BEFORE you analyse why a funnel step loses people. It answers one question — is there enough data here to support a conclusion — and returns no analysis of its own. The response is shaped to be handed to an AI agent verbatim.

It exists because the dangerous case is not a bad number, it is a number that should never have been computed. On a real paid landing page with 4,225 non-bot sessions over 14 days, zero fired the conversion event: the page carries no form, and its step is a click-through to another page. A conversion rate there reads 0.00% and invites "rewrite this page", which is wrong. So outcome_event_never_fires is its own verdict, kept distinct from a genuinely low rate.

Each evidence arm is reported available only when BOTH sides of its contrast hold at least min_arm_n sessions, and every available arm carries a confound field. Treat that field as load-bearing. On that same page the 190 sessions that threw a JavaScript error bounced less than clean ones (80.1% vs 88.1%) and reached the next step three times more often — you have to engage with a page to trigger an error, so the arm measures exposure, not harm. Read causally it claims errors improve conversion.

Counts are page-scoped AND order-scoped. An exception thrown two pages later is evidence about that step, not this one; and "advanced" requires a page after this one, not just a second page somewhere in the session — 17 of 521 sessions on the reference page saw their other page only before it, an error worth 3% on a landing page and approaching 100% mid-funnel. Bots are excluded: unfiltered, that page reads 4,834 sessions instead of 4,225, a 12.6% inflation landing entirely in the denominator.

Finally, available does not mean powered. Each available arm reports mde_pp — the smallest effect it could detect — and the top-level caveat fires when every arm with coverage carries a confound.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/explain/coverage?location_id=example_string&page=%2Fpricing&outcome_event=form_submitted&days=14" \
  -H "Content-Type: application/json" \
  -H "X-Location-Id: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "page": "example_string",
    "window_days": 42,
    "answerable": true,
    "caveat": "only_confounded_arms_available",
    "caveat_note": "example_string",
    "reason": "too_few_sessions",
    "hint": "example_string",
    "outcome": {
      "kind": "event",
      "note": "example_string",
      "event": "example_string",
      "n_positive": 42,
      "n_total": 42
    },
    "arms": [
      {
        "id": "error_outcome",
        "available": true,
        "n": 42,
        "mde_pp": 3.14,
        "confound": "exposure",
        "confound_note": "example_string",
        "reason": "too_few_error_sessions",
        "coverage": 3.14,
        "form_field_count": 10,
        "hint": "example_string"
      }
    ],
    "thresholds": {
      "min_arm_n": 30,
      "min_scroll_coverage": 0.05
    }
  }
}
GET
/explain/coverage
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.
query
location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

query
pagestring
Required

Pathname of the page, for example /pricing. A full URL is accepted and reduced to its pathname.

query
outcome_eventstring

The event that counts as advancing past this step. Omit it and "advanced" means the session saw a second page — the correct model for a bridge or advertorial page that carries no form.

query
daysinteger

Lookback window in days.

Min: 1 • Max: 90
header
X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys on the event routes. Ignored for secret (sk_) keys, which resolve their own location, and not used by /export.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_) as a bearer token. Format: Bearer ak_... or Bearer sk_.... Scoped keys (mcp_) are accepted too and need the read scope of the family the route belongs to (people, events, sessions, replays, exceptions, heatmaps or bigquery_export). See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Alternative to the X-Location-Id header for agency (ak_) keys. Ignored for secret (sk_) keys.

pagestring
Required

Pathname of the page, for example /pricing. A full URL is accepted and reduced to its pathname.

Example:
/pricing
outcome_eventstring

The event that counts as advancing past this step. Omit it and "advanced" means the session saw a second page — the correct model for a bridge or advertorial page that carries no form.

Example:
form_submitted
daysinteger

Lookback window in days.

Headers

X-Location-Idstring

Location to scope the request to. Required for agency (ak_) keys on the event routes. Ignored for secret (sk_) keys, which resolve their own location, and not used by /export.

Responses

successboolean
dataobject