ExperimentsCheck geo-testing eligibility

Check geo-testing eligibility

Pre-flight before any experiment: is this client a viable geo-testing candidate? Five checks — geo coverage (share of revenue carrying a region), history depth (≥28 days), market count (≥6 regions with meaningful revenue), matchability (the largest markets have at least one other market that moves with them, Pearson ≥ 0.5), and detectability (the daily budget the client's noise floor implies for a conclusive 30-day break-even test; judged against daily_budget when provided). Pass auto=true to skip guessing event names: the API inventories the location's top conversion-ish (non-$) events, detects which carry revenue (and at which JSON path), runs the full assessment per event, and returns the best candidate plus every event's verdict with suggested_measure / suggested_json_path.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/incrementality/eligibility?auto=true&daily_budget=3.14&lookback_days=90&event_name=John%20Doe&json_path=example_string&measure=revenue" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "window": {
      "from": "2026-05-01",
      "to": "2026-05-31"
    },
    "eligible": true,
    "failing_checks": [
      "example_string"
    ],
    "checks": {
      "geo_coverage": {
        "pass": true,
        "share_with_region": 0.94
      },
      "history": {
        "pass": true,
        "blocked_by": "example_string",
        "days_with_data": 42
      },
      "market_count": {
        "pass": true,
        "blocked_by": "example_string",
        "viable_markets": 42,
        "min_revenue_share": 0.02,
        "min_active_days": 23
      },
      "matchability": {
        "pass": true,
        "blocked_by": "example_string",
        "best_match_correlation": 3.14
      },
      "detectability": {
        "pass": true,
        "blocked_by": "example_string",
        "sigma_daily": 3.14,
        "daily_budget_for_30d_test": 3.14,
        "daily_budget": 3.14
      }
    },
    "root_cause": {
      "check": "geo_coverage",
      "share_with_region": 0,
      "blocks": [
        "history",
        "market_count",
        "matchability",
        "detectability"
      ],
      "remedy": "No revenue can be placed in a region. These conversions carry no geo — typically server-side/CRM events, which never pass through the edge that stamps it. This is a tracking gap, not a budget problem.
"
    },
    "window_narrowed": {
      "requested_lookback_days": 90,
      "used_lookback_days": 45,
      "reason": "scan_limit_exceeded"
    }
  }
}
GET
/client/v1/incrementality/eligibility
GET
Base URLstring

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

Bearer Token
Bearer Tokenstring
Required

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.
query
autostring

When true, assess every candidate conversion event and return the best one (ignores event_name/json_path/measure).

Options: true
query
daily_budgetnumber

Planned daily test spend to judge detectability against.

query
lookback_daysinteger

Days of history to assess. Default 90, min 14, max 365.

query
event_namestring

Conversion event name (default purchase).

query
json_pathstring

JSON path to revenue in properties_json (default $.value — properties_json IS the event's properties object).

query
measurestring

revenue (default) sums the value at json_path; count counts matching events instead — the lead-gen mode (e.g. ?event_name=form_submitted&measure=count).

Options: revenue, count
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need incrementality:read or incrementality:write. See Using an mcp_ key over HTTP.

Query Parameters

autostring

When true, assess every candidate conversion event and return the best one (ignores event_name/json_path/measure).

Allowed values:true
daily_budgetnumber

Planned daily test spend to judge detectability against.

lookback_daysinteger

Days of history to assess. Default 90, min 14, max 365.

event_namestring

Conversion event name (default purchase).

json_pathstring

JSON path to revenue in properties_json (default $.value — properties_json IS the event's properties object).

measurestring

revenue (default) sums the value at json_path; count counts matching events instead — the lead-gen mode (e.g. ?event_name=form_submitted&measure=count).

Allowed values:revenuecount

Responses

successboolean
dataobject