Starting from Conversions API Gateway and Signals Gateway v2.2.0, up-to-date versions of the Control Plane API reference docs, including examples with sample data, can be accessed inside your gateway UI. To find these docs:
Gets account specific event metrics at pixel and event level, provided admin has access to manage the account.
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
| Field | Description |
|---|---|
| Required Unique identifier of the account |
| Optional List of Pixel IDs for which event metrics needs to be fetched |
| Optional Time window in minutes (Default value is 60 minutes) |
EventMetricsSnapshot
| Field | Description |
|---|---|
| Identifier for EventMetricsSnapshot -- always EventTrafficSummary:incoming |
| Incoming events summary data |
| Outgoing events data |
| List of event activity |
| List of domain activity |
| Code | Description |
|---|---|
401 | Not authorized to view event metrics |
500 | Internal server error |
Query
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
}
}
}
}
Variables
{
"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
}
}
}
}
}