Get aggregated event stats
Returns aggregated event counts for the pixel (GET /{pixel_id}/stats).
Rows are passed through from Meta as-is — their shape depends on the
aggregation requested. Meta only (platform metaads); other platforms
return 405.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Pixel id.
Query Parameters
Aggregation dimension. Defaults to event.
"event""event" | "host" | "url" | "url_by_rule" | "pixel_fire" | "device_type" | "device_os" | "browser_type" | "had_pii" | "custom_data_field" | "match_keys" | "event_source" | "event_detection_method" | "event_processing_results" | "event_total_counts" | "event_value_count"Unix seconds lower bound.
Unix seconds upper bound.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.trackingtags.getTrackingTagStats({ path: { accountId: 'account_abc123', tagId: 'tag_abc123', },});console.log(data);{
"platform": "metaads",
"stats": {
"aggregation": "string",
"startTime": 0,
"endTime": 0,
"rows": [
{}
]
}
}{
"error": "Unauthorized"
}Stop sharing with an account DELETE
`adAccountId` may be passed as a query parameter (recommended) or as a JSON body field for clients that can send DELETE bodies. Meta only (platform `metaads`); other platforms return 405.
Get campaign analytics GET
Returns performance analytics for a whole campaign in one call: summary metrics, a daily timeline over the requested date range (summed across the campaign's ads), and optional demographic breakdowns. Breakdowns are fetched live from Meta at the campaign level (one call per dimension, no per-ad fan-out), so an agency dashboard gets campaign-level age/gender/etc. without summing thousands of per-ad reads. `campaignId` is the platform campaign id; pass `platform` when a campaign id could be ambiguous across platforms. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.