Pixel Stats
GET/{version}/{pixel_id}/statsVia 360: GET https://partner.quantri360.com/v1/facebook/{version}/{pixel_id}/stats
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Thống kê sự kiện pixel nhận được THEO GIỜ (tối đa 7 ngày gần nhất): số PageView, ViewContent, AddToCart, Purchase… hoặc theo thiết bị / trình duyệt / URL. Dùng để kiểm pixel còn bắn đủ sự kiện, phát hiện tụt sự kiện mua sau khi sửa web.
- Gọi thật:
platform_shop_id=act_<id>dùng được cho pixel tài khoản thấy ởadspixels; gửi pixel id thì 360 chỉ nhận khi pixel đó đã nối với brand (khác → lỗi tài sản chưa nối). - Pixel lâu không bắn (xem
last_fired_time) →datarỗng, không phải lỗi. - Chỉ có dữ liệu 7 ngày gần nhất; không gửi
start_timethì trả khoảng 24 giờ gần nhất. - Tên sự kiện tùy chỉnh của web (ví dụ
showroom_view) cũng xuất hiện cạnh sự kiện chuẩn.
Request
Endpoint
GET https://partner.quantri360.com/v1/facebook/{version}/{pixel_id}/stats
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | act_123456789 hoặc 1234567890 | Tài sản Facebook brand đã nối với 360: tài khoản quảng cáo (act_<id> hoặc <id>), Page id hoặc Pixel id — lấy ở GET /v1/platforms. Có thể bỏ khi đường dẫn đã chứa act_<id> / page id của brand. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| version | path | string | Yes | v25.0 | |
| pixel_id | path | string | Yes | 880903560703328 | Pixel id (lấy ở GET /act_{account_id}/adspixels). |
| platform_shop_id | query | string | No | act_5924809560908319 | Tài khoản quảng cáo dùng được pixel, dạng act_<id> (hoặc chính pixel id nếu pixel đã nối với 360). BẮT BUỘC khi brand nối nhiều tài sản Facebook. |
| aggregation | query | string | No | event | Gộp theo: event (mặc định, 100 sự kiện nhiều nhất) · device_type · device_os · browser_type · host · url (bỏ query string) · custom_data_field (cần event) · event_total_counts (tổng cả kỳ) · event_source · match_keys … |
| start_time | query | string | No | 1793260800 | Từ thời điểm (unix giây hoặc ISO 8601). Không xa hơn 7 ngày trước. |
| end_time | query | string | No | Đến thời điểm (mặc định = lúc gọi). | |
| event | query | string | No | Purchase | Tên sự kiện — dùng với aggregation=custom_data_field. |
| event_source | query | string | No | WEB_ONLY | WEB_ONLY (pixel trình duyệt) | SERVER_ONLY (Conversions API). |
Request examples
curl -s "https://partner.quantri360.com/v1/facebook/v25.0/880903560703328/stats?platform_shop_id=act_5924809560908319&aggregation=event&start_time=1793260800" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/facebook/v25.0/880903560703328/stats",
params={
"platform_shop_id": "act_5924809560908319",
"aggregation": "event",
"start_time": 1793260800
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/facebook/v25.0/880903560703328/stats');
for (const [k, v] of Object.entries({"platform_shop_id":"act_5924809560908319","aggregation":"event","start_time":1793260800})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/facebook/v25.0/880903560703328/stats' . '?' . http_build_query(['platform_shop_id' => 'act_5924809560908319', 'aggregation' => 'event', 'start_time' => 1793260800]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by Facebook)
| Name | Type | Sample | Description |
|---|---|---|---|
| data | object[] | Một dòng mỗi GIỜ. | |
| start_time | string | 2026-10-29T08:00:00+0000 | Đầu giờ, UTC (`+0000`) — cộng 7 ra giờ Việt Nam. |
| aggregation | string | event | Kiểu gộp đã yêu cầu. |
| data | object[] | `[{value, count}]` — `value` = tên sự kiện / thiết bị / URL…, `count` = số lần. |
Response sample
{
"data": [
{
"start_time": "2026-10-29T12:00:00+0000",
"aggregation": "event",
"data": [
{
"value": "PageView",
"count": 493
},
{
"value": "ViewContent",
"count": 255
},
{
"value": "InitiateCheckout",
"count": 28
},
{
"value": "AddToCart",
"count": 26
},
{
"value": "Search",
"count": 12
},
{
"value": "AddPaymentInfo",
"count": 2
},
{
"value": "Purchase",
"count": 2
}
]
},
{
"start_time": "2026-10-29T13:00:00+0000",
"aggregation": "event",
"data": [
{
"value": "PageView",
"count": 709
},
{
"value": "ViewContent",
"count": 378
},
{
"value": "AddToCart",
"count": 16
}
]
}
]
}
Get started
- Sign up for Partner
- Enable a data type of the Quảng cáo (Marketing API) group on the platform page
- Create an API key (tick the Facebook channel)
- Call it as in the examples above