Aggregated event stats for a tracking tag (Meta Pixel)
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"
}Create a tracking tag (Meta Pixel) POST
Creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. NOT idempotent: each call creates a new pixel. Do not retry blindly on timeout. Meta only (platform `metaads`); other platforms return 405.
Fetch a single tracking tag (Meta Pixel) GET
Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.