AI-powered A/B testing. Drop in one script tag — the agent handles split assignment, statistical analysis, and winner calling automatically.
site_id and api_key. Save the key — it won't be shown again.curl -X POST https://cro.meetkai.xyz/api/register \
-H "Content-Type: application/json" \
-d '{
"site_id": "mysite",
"name": "My Site",
"domain": "mysite.com"
}'
# Response:
# {
# "site_id": "mysite",
# "api_key": "cro_xxxxxxxxxxxx",
# "script": "<script src=...></script>"
# }
<head>. That's the entire frontend install.<script src="https://cro.meetkai.xyz/agent.js" data-site="mysite"></script>
cro-pending to elements you plan to test to prevent flash of original copy:<h1 class="hero cro-pending">Your current headline</h1>
curl -X POST https://cro.meetkai.xyz/api/sites/tests \
-H "Authorization: Bearer cro_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"page_path": "/",
"element": "hero_headline",
"selector": "h1.hero",
"conversion_selector": "a[href=\"/signup\"], .btn-primary",
"control_copy": "Your current headline",
"challenger_copy": "Your challenger headline",
"min_days": 7
}'
On page load, agent.js fetches the active test for the current page. It assigns the visitor to a variant via a 30-day cookie, swaps the copy, and logs an impression. If the visitor clicks the conversion selector in the same session, a conversion is logged.
Every 6 hours, a cron job evaluates all active tests. When a test reaches 95% statistical confidence with at least 200 impressions per variant and has run for the minimum days, the winner is called and the test is marked complete.
Only one test runs per page at a time. Multiple pages can have tests simultaneously.
POST /api/register
Body:
site_id string Unique ID for your site (lowercase, alphanumeric, hyphens ok)
name string Human-readable label
domain string Your site domain
Returns: { site_id, api_key, script }
POST /api/sites/tests
Authorization: Bearer <api_key>
Body:
page_path string Path to run the test on (e.g. "/", "/pricing")
element string Label for the dashboard (e.g. "hero_headline")
selector string CSS selector of element to swap
conversion_selector string CSS selector(s) that trigger a conversion
control_copy string Current copy (shown to ~50% of visitors)
challenger_copy string Challenger copy to test
min_days int Minimum days before winner can be called (default: 7)
Returns: { test_id, status, site_id }
GET /api/sites/tests Authorization: Bearer <api_key> Returns: array of tests with live CVR data per variant
| Field | Type | Notes |
|---|---|---|
| selector | CSS selector | Targets the element to swap. Must be unique on the page. |
| conversion_selector | CSS selector | Comma-separated selectors. Click on any match = conversion. |
| min_days | integer | Prevents calling a winner too early. Recommended 7+. |
| page_path | string | Exact path. Use "/" for homepage. Does not support wildcards in v1. |