在管理员有权管理某个账户的条件下,获取 Pixel 像素代码和事件层级的该账户专用事件指标。
POST https://{capig_domain}/capig/graphql/ _________________________________________________________________________________________________________________ query HomeViewQuery($tenantId: ID!, $pixelIds: [String!], $timeWindow: Int) { tenantQueries(tenantId: $tenantId) { eventMetrics(pixelIds: $pixelIds, timeWindowMin: $timeWindow) { activity { name receivedCount publishedCount lastUpdated } incoming { eventNamesCount eventsCount } outgoing { eventNamesCount eventsCount publishSuccessRate } } } } _________________________________________________________________________________________________________ tenantId: ID! _______________________________________________________________________________________________________ pixelIds: [String!] _______________________________________________________________________________________________________ timeWindow: Int
字段 | 描述 |
---|---|
| 必要 此账户的唯一标识符 |
| 非必要 需要获取事件指标的 Pixel 像素代码编号清单 |
| 非必要 时间窗以分钟为单位(默认值为 60 分钟) |
EventMetricsSnapshot
字段 | 描述 |
---|---|
| EventMetricsSnapshot 的标识符 — 始终为 EventTrafficSummary:incoming |
| 传入事件摘要数据 |
| 传出事件数据 |
| 事件动态清单 |
| 网域动态清单 |
代码 | 描述 |
---|---|
401 | 无权查看事件指标 |
500 | 内部服务器错误 |
查询
query HomeViewQuery($tenantId: ID!, $pixelIds: [String!], $timeWindow: Int) { tenantQueries(tenantId: $tenantId) { eventMetrics(pixelIds: $pixelIds, timeWindowMin: $timeWindow) { activity { name receivedCount publishedCount lastUpdated } incoming { eventNamesCount eventsCount } outgoing { eventNamesCount eventsCount publishSuccessRate } } } }
变量
{ "tenantId": "IaoreXfj", "pixelIds": ["18904456377094531"] }
{ "data": { "tenantQueries": { "eventMetrics": { "activity": [ { "name": "Purchase_PN_Mar22_Events", "receivedCount": 4, "publishedCount": 0, "lastUpdated": "1678753252000" } ], "incoming": { "eventNamesCount": 1, "eventsCount": 4 }, "outgoing": { "eventNamesCount": 0, "eventsCount": 0, "publishSuccessRate": 0.0 } } } } }