Contents
A/B Test Results - Plugixa Chat
GET /plugixa-chat/v1/experiments/{id}/results
Read the views, opens, clicks and leads of both widgets since the test started.
Needs Plugixa Chat Pro. The signed-in user needs the plugixa_chat_view capability. Administrators have it.
Request
GET https://your-site.example/wp-json/plugixa-chat/v1/experiments/7/results
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The test’s id |
Responses
200 OK.
{
"success": true,
"data": {
"from": "2026-11-12 10:00:00",
"to": "2026-11-19 10:00:00",
"variants": [
{
"key": "a",
"widget": 2,
"name": "Main widget",
"share": 50,
"view": 920,
"open": 101,
"click": 44,
"leads": 6
},
{
"key": "b",
"widget": 5,
"name": "Main widget (blue)",
"share": 50,
"view": 905,
"open": 118,
"click": 58,
"leads": 9
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.from |
string|null |
UTC start of the period: the first whole hour after the test started. null for a draft |
data.to |
string|null |
UTC end: the hour after the test ended, or after now while it runs |
data.variants |
array |
Widget A then widget B. Empty for a draft |
data.variants[].share |
integer |
Percentage of visitors this widget was shown to |
data.variants[].name |
string |
The widget’s name, empty if it has since been trashed or purged |
data.variants[].view, open, click |
integer |
The widget’s counts over the period |
data.variants[].leads |
integer |
Leads from the widget over the period, trashed ones included |
The figures are raw counts: the verdict the admin screen shows is not part of the response.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_chat_not_found |
No test has this id, or it is in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chat/v1/experiments/7/results" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chat/v1/experiments/7/results');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-chat/v1/experiments/7/results', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share