Zernio
APIFor you
Zernio
APIFor you
API Reference

Pixels & Tracking Tags

Tags

List tracking tagsGETCreate a tracking tagPOSTGet a tracking tagGETUpdate a tracking tagPATCHGet aggregated event statsGETGet tag diagnosticsGET

Conversion Events

List conversion eventsGETCreate a conversion eventPOSTUpdate a conversion eventPATCHDelete a conversion eventDELETE

Sharing

List accounts it is shared withGETShare with an ad accountPOSTStop sharing with an accountDELETE

Users and Partners

List tag usersGETAssign a user to a tagPOSTRemove a user from a tagDELETEList partner businesses of a tagGET

Store Install

Install on a Shopify, WordPress, Wix or Webflow sitePOSTGet store install statusGETRemove from a Shopify, WordPress, Wix or Webflow siteDELETE

Ad URL Tracking Tags

Get ad tracking tagsGETSet ad tracking tagsPATCH
Dashboard
OverviewPlatformsAPI ReferenceResources
Pixels & Tracking Tags

Get aggregated event stats

Shows event counts or health for a tracking tag so you can confirm it is firing, where the platform reports them.

Meta: aggregated counts (GET /{pixel_id}/stats), rows passed through as-is; their shape depends on the aggregation requested. Platforms without a stats API answer 501.

OpenAI Ads: the recent-events stream (GET /conversions/events), the latest (at most 50) events received in the last 15 minutes, one row per event (event_type, api_channel, event_timestamp_ms, received_at_ms, ...). Both sources appear: api_channel is pixel_sdk for the on-site Pixel (including its openai::sdk_init load event) and server_to_server for Conversions API events. It is a fixed window: startTime/endTime answer 400. Use it to confirm an install fires; attributed totals come from ads analytics. Accounts not enabled for the stream answer 422 feature_not_available.

LinkedIn (linkedinads): health rows rather than counts, since LinkedIn exposes no per- event fire counts: one row per site domain the tag has seen (kind: domain, domainName, lastFiredTime, creationTime, blocked), capped at the 100 domains that fired most recently (newest first; a tag seen on more domains drops the least recent), and one per conversion rule (kind: conversion_rule, id, name, type, conversionMethod, status, lastFiredTime). Times are unix seconds; startTime/endTime are ignored.

Pinterest (platform pinterestads): rows typed by type: one tag row (lastFiredTime, status, enhancedMatchStatus), event rows for the conversion events Pinterest has seen on the tag (source is page_visit or ocpm_eligible, the latter meaning the event can be optimized for, with the neutral siteEvent where one maps), and event_quality rows with the ad account's Event Quality Score for tag events over the last 1d and 14d (ad-account level, not per tag; an account Pinterest cannot score yet carries error instead). Pinterest has no time-bounded counts, so startTime/endTime answer 400.

TikTok: per-event counts from /pixel/event/stats/ (total_count, browser_event_total_count, server_event_total_count, attributed_count, preview_count), bucketed by UTC day. Defaults to the last 7 days; at most 30 days per request. aggregation is not accepted.

X Ads (platform xads): X has no event counts per pixel or event (only campaign-level conversion metrics). Each row is one web event tag with its status (TRACKING, UNVERIFIED, DORMANT), lastTrackedTime (unix seconds, null if never seen), autoCreated and, for events the site can fire, siteEventId.


PlatformsMetaGoogleTikTokLinkedInPinterestXOpenAI
GET
/v1/accounts/{accountId}/tracking-tags/{tagId}/stats

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

accountId*string
tagId*string

Tag id (TrackingTag.id).

Query Parameters

adAccountId?string

Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.

aggregation?string

Meta only (400 on other platforms): aggregation dimension. Defaults to event.

Default"event"

Value in

  • "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"
startTime?integer

Unix seconds lower bound.

endTime?integer

Unix seconds upper bound.

Response Body

application/json

application/json

application/json

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": [      {}    ]  }}
Was this page helpful?

Update a tracking tag

Changes a pixel's settings, such as its name or automatic matching, on platforms that allow edits. Partial-update a pixel. Whitelisted fields: `name` (rename), `enableAutomaticMatching`, `automaticMatchingFields`, `firstPartyCookieStatus`, `dataUseSetting`. At least one is required. Returns the re-fetched canonical tag. Meta only (platform `metaads`); other platforms return 501. OpenAI Ads answers 501: its API has no pixel update or delete route (`POST`/`PATCH`/`PUT`/`DELETE /v1/conversions/pixels/{id}` answer 405 "Invalid method"); rename a pixel in OpenAI Ads Manager. Google Ads (`googleads`): the only writable tag setting is `autoTagging` (the account's gclid auto-tagging, without which the tag cannot attribute conversions to ad clicks). Google rejects every write to `conversion_tracking_setting` for our developer token (`SERVICE_ACCESS_DENIED`), so the tag id and cross-account ownership stay managed in the Google Ads UI. There is no DELETE: Meta has no API to delete a pixel. To stop using one, unshare it from your ad accounts (`DELETE .../tracking-tags/{tagId}/shared-accounts`) or disable it in Events Manager. LinkedIn (`linkedinads`): only `firstPartyCookieStatus` (`first_party_cookie_enabled` or `first_party_cookie_disabled`), which sets the tag's first-party tracking. It applies to every ad account using the tag. `empty` answers 400: LinkedIn has no unset state. Pinterest (platform `pinterestads`): 501. Pinterest API v5 has no endpoint to edit a tag: its spec lists only POST/GET on `conversion_tags` and GET on `conversion_tags/{id}`, and PATCH or PUT on `conversion_tags/{id}` answer 405 "Method not allowed". Set enhanced match at creation (`automaticMatchingFields`) or change it and the name in Pinterest Ads Manager. TikTok: `name`, `enableAutomaticMatching` + `automaticMatchingFields` (folded onto TikTok's five switches: em, ph, fn/ln, ct/st/zp/country, external_id; ge and db answer 400), and first-party cookies via `enableFirstPartyCookies` or `firstPartyCookieStatus` (enabled or disabled). TikTok has no pixel delete: the endpoint is absent from its API and `POST /pixel/delete/` answers 404. Pinterest (platform `pinterestads`): 501. Pinterest API v5 only creates, lists and reads tags (no update endpoint); rename a tag or change its enhanced match settings in Pinterest Ads Manager. X Ads (platform `xads`): only `firstPartyCookieStatus` (`first_party_cookie_enabled` or `first_party_cookie_disabled`), which sets the pixel's first-party cookie setting. X has no API to rename or delete a pixel.

Get tag diagnostics

Shows Meta's health checks for a pixel, such as events missing parameters or product ids that do not match your catalogs. Platforms without tag diagnostics answer 501. Meta: the pixel's checks from Events Manager (`da_checks`), e.g. whether events miss parameters or their content ids do not match the pixel's catalogs.