Get ad tracking tags
Unified read of the platform's native click-URL tracking params.
- Meta (facebook/instagram): the creative's
url_tags(and template_url_spec). - Google (googleads): the campaign's
trackingUrlTemplate+finalUrlSuffix. Subject to the Google Ads API access-tier daily quota; bulk audits need Standard access. - LinkedIn (linkedinads): the campaign's Dynamic UTM
dynamicValueParameters+customValueParameters. Returns 405 for platforms without a click-URL tracking surface (TikTok, X, Pinterest).
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Ad id (hex _id, platformAdId, or effective story/media id).
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.getAdTrackingTags({ path: { adId: 'ad_abc123', },});console.log(data);{
"platform": "string",
"level": "creative",
"urlTags": "string",
"templateUrlSpec": {},
"trackingUrlTemplate": "string",
"finalUrlSuffix": "string",
"dynamicValueParameters": {},
"customValueParameters": {}
}{
"error": "Unauthorized"
}Create a tracking tag POST
Meta: 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 Meta 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`. OpenAI Ads: creates an OpenAI pixel AND provisions a Conversions API key for it in the same call (`adAccountId` is required by this endpoint but ignored — one API key maps to exactly one ad account, so there's nothing to select). Returns 422 (`FEATURE_NOT_AVAILABLE`) if the ad account isn't enabled for pixel management; contact your OpenAI partner representative to enable it. There is no delete API for OpenAI pixels. If the pixel is created but the Conversions API key provisioning then fails, the pixel is left live on OpenAI (it cannot be cleaned up) and the error message names the surviving pixel id and warns against retrying, since a retry would create a second, orphaned pixel. NOT idempotent on either platform: each call creates a new pixel (and, for OpenAI, a new Conversions API key). Do not retry blindly on timeout. Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405.
Get aggregated event stats GET
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.