Contents
Get Statistics - Plugixa Image Map
GET /plugixa-image-map/v1/stats
A map’s views, tooltip opens and clicks, day by day and per hotspot.
Any signed-in user with the plugixa_image_map_view capability. Administrators have every Plugixa Image Map capability; see Roles and permissions. Needs Plugixa Image Map Pro: on the free build this route does not exist and answers 404.
Request
GET https://your-site.example/wp-json/plugixa-image-map/v1/stats?map=12&days=7
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
map |
integer |
The map. Required in practice: without it the answer is 404. |
|
days |
integer |
30 |
7, 30, 90 or 365: the period, ending today (UTC). |
This endpoint is not paged.
Responses
200 OK. data is the report.
{
"success": true,
"data": {
"days": [
{
"day": "2026-11-06",
"views": 0,
"opens": 0,
"clicks": 0
},
{
"day": "2026-11-07",
"views": 12,
"opens": 5,
"clicks": 2
},
{
"day": "2026-11-08",
"views": 9,
"opens": 4,
"clicks": 1
},
{
"day": "2026-11-09",
"views": 20,
"opens": 11,
"clicks": 6
},
{
"day": "2026-11-10",
"views": 17,
"opens": 8,
"clicks": 3
},
{
"day": "2026-11-11",
"views": 14,
"opens": 6,
"clicks": 2
},
{
"day": "2026-11-12",
"views": 8,
"opens": 3,
"clicks": 1
}
],
"objects": [
{
"id": "o_3f9a1c2e",
"opens": 37,
"clicks": 15
}
],
"totals": {
"views": 80,
"opens": 37,
"clicks": 15
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.days[] |
array |
One entry per day of the period, oldest first, with zeros on days with nothing: day (YYYY-MM-DD), views, opens, clicks |
data.objects[] |
array |
Per hotspot id: opens and clicks, most clicked first. Only hotspots with activity are listed |
data.totals |
object |
views, opens and clicks over the period |
See Statistics for what counts as a view, an open and a click.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_image_map_not_found |
No map with that id, or the map is in the trash. |
400 |
rest_invalid_param |
days is not one of the four values. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-image-map/v1/stats?map=12&days=7" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'map' => 12,
'days' => 7,
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-image-map/v1/stats?' . $query);
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 query = new URLSearchParams({
map: '12',
days: '7',
});
const response = await fetch(`https://your-site.example/wp-json/plugixa-image-map/v1/stats?${query}`, {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share