Zernio
Zernio
API Reference

Pixels & Tracking Tags

List accounts it is shared withGETList tracking tagsGETCreate a tracking tagPOSTGet ad tracking tagsGETGet aggregated event statsGETGet store install statusGETGet a tracking tagGETSet ad tracking tagsPATCHUpdate a tracking tagPATCHShare with an ad accountPOSTInstall on a Shopify store or WordPress sitePOSTRemove from a Shopify store or WordPress siteDELETEStop sharing with an accountDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Pixels & Tracking Tags

Install on a Shopify store or WordPress site

Puts the Meta pixel on a connected Shopify store's storefront and checkout through Zernio's Shopify web pixel (a Shopify app pixel, no theme edits). The store then sends PageView, ViewContent, AddToCart, Search, InitiateCheckout, AddPaymentInfo and Purchase (with value, currency, content_ids and contents) to the pixel, each with an event id. Purchase uses shopify_order_{orderId} as its event id, so a Conversions API Purchase you send for the same order with that eventId is deduplicated by Meta.

Idempotent: a store runs one Zernio pixel, so calling it again updates the install and installing a different tag replaces the previous one (reported in replacedTagId). Events respect the store's customer privacy settings (marketing consent).

accountId is the Meta ads account that owns the pixel (tagId); storeAccountId is the Shopify account. Stores connected before pixel support must re-approve the Zernio app: the call then answers 409 reconnect_required with details.authUrl to send the merchant to (the Shopify account id stays the same). Meta only (platform metaads); other platforms return 405.

WordPress (storeAccountId is a connected WordPress.com or self-hosted site): Zernio adds a Custom HTML widget with the Meta pixel base code (fbevents.js, init, PageView) to a widget area of the active theme (a footer area when there is one, else the first active area; pass sidebarId to choose), then reads the widget back to confirm WordPress kept the <script> tag. The widget carries a Zernio marker, so the call is idempotent per pixel: repeating it updates or moves the same widget, and pixel code the site owner pasted by hand is never touched. Several pixels can run side by side (one widget each). When the site cannot run the pixel, nothing is left behind and the call answers 422 tracking_tag_install_blocked with details.reason:

  • insufficient_permissions: the connected user lacks edit_theme_options (needs Administrator).
  • scripts_stripped: WordPress removed the script (the user lacks unfiltered_html, e.g. a multisite admin who is not a Super Admin, or DISALLOW_UNFILTERED_HTML is set).
  • wordpress_com_plan: a WordPress.com plan that strips scripts (plans without plugins).
  • no_widget_areas: the theme has no widget areas (block themes such as Twenty Twenty-Five).
  • widgets_api_unavailable: no widgets REST API (WordPress older than 5.8, or disabled). The error message names the manual alternative (Meta's official WordPress plugin). With verifyHomepage (default true) the homepage is fetched afterwards and homepageCheck says whether the pixel is visible; not_found can be a stale page cache, the widget read-back is authoritative.

PlatformsMetaShopifyWordPress
POST
/v1/accounts/{accountId}/tracking-tags/{tagId}/install

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

Meta pixel id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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.installTrackingTagOnStore({  path: {    accountId: 'account_abc123',    tagId: 'tag_abc123',  },  body: {    storeAccountId: 'storeaccount_abc123',  },});console.log(data);
{  "platform": "metaads",  "install": {    "storeAccountId": "string",    "platform": "shopify",    "installed": true,    "shopDomain": "string",    "installedTagId": "string",    "webPixelId": "string",    "siteUrl": "string",    "method": "wordpress_widget",    "widgetId": "string",    "sidebarId": "string",    "replacedTagId": "string",    "sidebarName": "string",    "created": true,    "homepageCheck": "found"  }}
Was this page helpful?

Share with an ad account

Shares the pixel with another ad account so campaigns/audiences in that account can use it. Requires that you administer both the pixel's owning Business Manager and the target ad account; a pixel on a personal (non-BM) ad account can't be shared (Meta will reject the call). Meta only (platform `metaads`); other platforms return 405.

Remove from a Shopify store or WordPress site

Removes the pixel from the store. Idempotent: nothing installed returns 200 with `installed: false`. If the store fires a different pixel, nothing is removed and the call answers 409 `invalid_resource_state`. Meta only (platform `metaads`). WordPress: deletes every widget Zernio created for this pixel and reports how many in `removed` (0 when nothing was installed). Pixel code added by hand is left alone.

storeAccountId*string

The connected Shopify (shopify) or WordPress (wordpress) account id.

sidebarId?string

WordPress only: widget area to use (see install.preflight.sidebars from GET). Defaults to a footer area.

verifyHomepage?boolean

WordPress only: fetch the homepage afterwards and report homepageCheck.

Defaulttrue