Get a tracking tag
Shows one pixel or measurement tag in full, including its install snippet, when it last fired and its conversion events.
Returns the full tag record including the base-code code snippet,
lastFiredTime, ownerBusinessId, isUnavailable, etc. Meta only
(platform metaads); other platforms return 501.
OpenAI Ads (openaiads): tagId is the pixel's API id (cds_...) or
its pixel_id. OpenAI documents no single-pixel read, so the tag is
resolved from the pixel list; the response adds code (the official
oaiq base code plus page_viewed) and events (the conversion
event settings whose source is this pixel). siteTagId is the
pixel_id the site and the Conversions API send; id is what event
settings reference.
LinkedIn (linkedinads): code is LinkedIn's base code, lastFiredTime is the most
recent callback across the tag's domains (unix seconds, null when it never fired) and
events lists the ad account's conversion rules. siteEvent and siteEventId are set
only on rules a page can fire (event-specific Insight Tag rules: not Conversions API
rules, no URL match rules). adAccountId picks which ad account's rules to read; it
defaults to the account that created the tag.
Pinterest (platform pinterestads): returns the tag with Pinterest's own code snippet
and lastFiredTime. Without adAccountId Zernio finds the ad account that owns the tag
(404 when no readable ad account holds it).
TikTok: read from /pixel/list/?pixel_id=; code is TikTok's pixel_script, events
the pixel events. lastFiredTime is not available on TikTok. Without adAccountId the
connection's advertisers are searched.
X Ads (platform xads): tagId is the X ad account id. Returns the pixel id as
siteTagId, the X Pixel base code as code, and the conversion events the site can fire
in events (each with siteEventId = tw-<pixel>-<event>, also the event_id of the X
Conversions API). An ad account without a pixel answers 400.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Tag id (TrackingTag.id).
Query Parameters
Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
Response Body
application/json
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.getTrackingTag({ path: { accountId: 'account_abc123', tagId: 'tag_abc123', },});console.log(data);{ "platform": "metaads", "tag": { "id": "string", "siteTagId": "string", "events": [ { "id": "string", "name": "string", "type": "string", "siteEvent": "page_view", "siteEventId": "string", "status": "string", "defaultValue": 0, "currency": "string", "clickWindowDays": 0, "viewWindowDays": 0, "urlContains": "string", "alwaysUseDefaultValue": true, "primary": true, "countingType": "one" } ], "name": "string", "platform": "metaads", "kind": "pixel", "status": "active", "code": "string", "lastFiredTime": 0, "isUnavailable": true, "installed": true, "creationTime": 0, "automaticMatchingFields": [ "em" ], "ownerBusinessId": "string", "ownerAdAccountId": "string", "autoTagging": true }}Create a tracking tag
Creates a measurement pixel on an ad account and returns the snippet to install on your site. Meta: creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels`, where `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 plus, with `defaultEventType`, a new conversion event setting). Do not retry blindly on timeout. Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 501. LinkedIn (`linkedinads`): creates the ad account's Insight Tag (`POST /rest/insightTags`). Idempotent: an ad account holds at most one Insight Tag, so when it already has one that tag is returned and nothing is created. `name` is ignored (LinkedIn tags have no name) and there is no API to delete an Insight Tag. Pinterest (platform `pinterestads`): creates a Pinterest tag on the numeric ad account `adAccountId` (`POST /v5/ad_accounts/{id}/conversion_tags`). Returns the tag with Pinterest's `code` snippet. `automaticMatchingFields` switches on automatic enhanced match for those fields. NOT idempotent and Pinterest has no dry-run and no delete for tags (DELETE on `conversion_tags/{id}` answers 405), so never retry blindly: list first. Google Ads (`googleads`): every Google Ads account has exactly one Google tag (`AW-...`), so this is idempotent. `adAccountId` is the 10-digit customer id. When the account already tracks conversions the existing tag is returned (201) and nothing is created. Otherwise a first WEBPAGE conversion action named `name` (category DEFAULT) is created, which is what switches Google's conversion tracking on, and the tag is returned with it as its first event. TikTok: `POST /pixel/create/` on the advertiser in `adAccountId` (numeric). Names are at most 40 characters with no emoji and must be unique; TikTok refuses a duplicate name (400), which is its only retry guard. TikTok has no pixel delete API. Pinterest's `code` snippet. NOT idempotent and Pinterest has no dry-run and no delete for tags, so never retry blindly: list first. X Ads (platform `xads`): creates the ad account's X Pixel (its UNIVERSAL website tag) with first-party cookies on. `adAccountId` is the X ad account id; `name` is not stored (X pixels have no name). X allows one pixel per ad account and cannot delete one, so an account that already has a pixel answers 409 without writing anything.
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.