DestinationsMida's own test results, with time left to a result

Mida's own test results, with time left to a result

Reads your Mida project's experiments and results through Mida's REST API with the stored mida_experiments credential, and adds a time-to-result plan to each test. Mida reports results but no time remaining.

Every test Mida lists is returned. A test deleted in Mida is absent, so Mythic exposures recorded for it ($experiment_arm mida:<testId>:<variant>) are history, not a running test. Drafts are listed without results. Results are read for up to 20 non-draft tests, most recently updated first; truncated is true when there were more. Each arm carries mythic_arm, the exact $experiment_arm value Mythic records, so Mida's counts can be put next to Mythic's.

Planning is a fixed-horizon power calculation. For each variant against Control: the visitors per arm a two-sided two-proportion z-test needs to detect a relative lift of mde with probability power at significance alpha (Fleiss, no continuity correction; alpha is Bonferroni-split across variants; the arms' traffic weights set the allocation). The baseline is Control's rate once Control has 10 conversions, otherwise the pooled rate. Days remaining are the slowest arm's shortfall divided by that arm's observed visitors per day. days_remaining_range repeats the calculation at both ends of the baseline's 95% Wilson interval. detectable_lift_now is the smallest relative lift the visitors already in can detect.

Early on, the page's history fills in. When a live test covers everyone on one URL (no Mida targeting rules, one URL), Mythic reads the 28 days before the test started on that path: the typical day (median of the last 7 days' distinct viewers, scaled down by how often viewers return) and the share of viewers who did the goal's Mythic event within 30 days. The goal's event is the one a mida_experiments destination forwards under the goal's name, else the goal's own name. These are blended in as priors: traffic as a Gamma-Poisson prior worth 7 days, dropped once the test has run 7 days; the baseline as a Beta power prior worth at most 30 conversions, dropped once the test has 30 of its own. history reports what was read or why it was not, and planning.baseline.history_share / planning.traffic.history_share how much of each estimate it supplied. Without history, days remaining wait for a full day of the test's own traffic.

Mida decides winners with a Bayesian engine whose threshold relaxes as a test ages (confidence_needed_today), so the plan answers "when could a fixed-horizon test detect this lift", not "when will Mida call a winner".

Mida is read at most once a minute per project; changing mde, power or alpha re-plans without re-reading Mida.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/destinations/mida/experiments?mde=0.2&power=0.8&alpha=0.05&project_key=example_string&region=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "data": {
    "project_key": "example_string",
    "region": "example_string",
    "planning_options": {
      "mde": 3.14,
      "power": 3.14,
      "alpha": 3.14
    },
    "truncated": true,
    "tests": [
      {
        "test_id": 123,
        "test_name": "John Doe",
        "status": "live",
        "is_aa": true,
        "is_completed": true,
        "serving_variant_id": "example_string",
        "url": "example_string",
        "start_date": "2024-12-25T10:00:00Z",
        "end_date": "2024-12-25T10:00:00Z",
        "days_running": 3.14,
        "stats_engine": "example_string",
        "confidence_threshold": 3.14,
        "confidence_needed_today": 3.14,
        "stop_rules": {
          "end_test_date": "example_string",
          "completion_visitor": 42,
          "completion_after_period_days": 42
        },
        "primary_goal": {
          "name": "John Doe",
          "type": "example_string",
          "value": "example_string"
        },
        "total_visitors": 42,
        "total_conversions": 42,
        "has_revenue": true,
        "total_revenue": 3.14,
        "currency": "example_string",
        "result_error": "example_string",
        "traffic_allocation": 3.14,
        "targeting": {
          "simple": true,
          "rules": [
            "example_string"
          ]
        },
        "history": {
          "used": true,
          "reason": "example_string",
          "paths": [
            "example_string"
          ],
          "goal_event": "example_string",
          "window": {
            "from": "2024-12-25",
            "to": "2024-12-25"
          },
          "typical_day": 3.14,
          "distinct_ratio": 3.14,
          "daily_visitors": 3.14,
          "visitors": 42,
          "conversions": 42
        },
        "arms": [
          {
            "arm": "example_string",
            "mythic_arm": "example_string",
            "variant_id": "example_string",
            "name": "John Doe",
            "is_control": true,
            "visitors": 42,
            "conversions": 42,
            "conversion_rate": 3.14,
            "traffic_weight": 1.5,
            "chance_to_beat_control": 3.14,
            "improvement": 3.14,
            "meets_winner_rule": true,
            "revenue": 3.14
          }
        ],
        "planning": {
          "status": "estimating",
          "reason": "example_string",
          "inputs": {
            "mde": 3.14,
            "power": 3.14,
            "alpha": 3.14,
            "alpha_per_comparison": 3.14,
            "comparisons": 42
          },
          "baseline": {
            "rate": 3.14,
            "source": "control",
            "conversions": 3.14,
            "visitors": 3.14,
            "history_share": 3.14,
            "ci95": [
              3.14
            ]
          },
          "traffic": {
            "source": "test",
            "history_share": 3.14
          },
          "required_per_arm": {},
          "current_per_arm": {},
          "daily_visitors_per_arm": {},
          "elapsed_days": 3.14,
          "days_remaining": 42,
          "days_remaining_range": [
            42
          ],
          "estimated_end_date": "2024-12-25",
          "detectable_lift_now": 3.14,
          "stop_rules": {
            "visitors": {
              "target": 42,
              "current": 42,
              "progress": 3.14,
              "days_remaining": 42
            },
            "period": {
              "target_days": 42,
              "elapsed_days": 3.14,
              "days_remaining": 42
            },
            "end_date": {
              "date": "example_string",
              "days_remaining": 42
            }
          },
          "warnings": [
            "baseline_pooled"
          ],
          "method": "example_string"
        }
      }
    ]
  }
}
GET
/client/v1/destinations/mida/experiments
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 destinations:read or destinations: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 destinations:read or destinations:write. See Using an mcp_ key over HTTP.
query
mdenumber

Minimum detectable effect as a relative lift. 0.2 = +20%. Values outside the range are a 400, not clamped.

Min: 0.01 • Max: 5
query
powernumber
Min: 0.5 • Max: 0.99
query
alphanumber

Two-sided significance level for the whole test, split across variants.

Min: 0.001 • Max: 0.2
query
project_keystring

Mida project key. Defaults to the project of this location's most recently updated mida_experiments destination.

Pattern: ^[A-Za-z0-9_-]{8,64}$
query
regionstring

Mida API region. Defaults to the destination's region, else us.

Pattern: ^[a-z]{2}$
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 destinations:read or destinations:write. See Using an mcp_ key over HTTP.

Query Parameters

mdenumber

Minimum detectable effect as a relative lift. 0.2 = +20%. Values outside the range are a 400, not clamped.

alphanumber

Two-sided significance level for the whole test, split across variants.

project_keystring

Mida project key. Defaults to the project of this location's most recently updated mida_experiments destination.

regionstring

Mida API region. Defaults to the destination's region, else us.

Responses

dataobject