Create a conversion event
Creates a conversion event tied to the tag. Pass the platform's own event type in type
(e.g. Google PURCHASE, LinkedIn ADD_TO_CART, X CHECKOUT_INITIATED) or a neutral
siteEvent the platform maps to its closest type. Each platform stores a subset of the
optional fields; sending one it does not store answers 400 naming the supported fields.
NOT idempotent unless noted per platform: do not retry blindly.
OpenAI Ads: creates a conversion event setting on the pixel (POST /conversions/event_settings, source = the pixel). Accepts name, type and
siteEvent only. type is a standard event (order_created, lead_created,
items_added, contents_viewed, checkout_started, registration_completed,
subscription_created, trial_started, appointment_scheduled, page_viewed,
app_installed, app_opened) or, for anything else, the custom event name itself
(1 to 64 letters, digits, underscores or dashes; stored lowercase). siteEvent maps
search and add_payment_info to the custom events search and addpaymentinfo,
the names Zernio's Shopify pixel sends. The click attribution window is 30 days, the
only value OpenAI documents. Only standard events can be a conversions campaign's
optimization goal.
LinkedIn (linkedinads): creates an event-specific Insight Tag conversion rule (no URL
match rules), the kind a page or the Shopify pixel fires by id. type is a LinkedIn
conversion type (e.g. PURCHASE, ADD_TO_CART, START_CHECKOUT, LEAD); siteEvent
maps to KEY_PAGE_VIEW, VIEW_CONTENT, ADD_TO_CART, SEARCH, START_CHECKOUT,
ADD_BILLING_INFO or PURCHASE. defaultValue needs currency (the ad account
currency) and is a fallback: a value sent with the event wins. Click and view windows are
in days (LinkedIn validates them: the docs list 1, 7 and 30, and rules with 90 exist).
Stores name, type, siteEvent, enabled, defaultValue, currency, clickWindowDays,
viewWindowDays. Not idempotent.
Meta: creates a custom conversion on adAccountId (default: the pixel's owner ad
account). Accepts name, type (Meta custom_event_type: PURCHASE, LEAD,
ADD_TO_CART, COMPLETE_REGISTRATION, OTHER...), siteEvent, urlContains and
defaultValue (in the ad account currency). The rule matches the standard event of
siteEvent (or of type), plus urlContains when given; urlContains alone matches
page views on that URL. type: OTHER needs siteEvent or urlContains. Idempotent by
name: an active conversion with the same name on this pixel is returned instead of a
duplicate. Meta caps custom conversions per ad account; the cap answers 400.
Google Ads (googleads): creates a WEBPAGE conversion action. type is a
ConversionActionCategory (e.g. PURCHASE, SIGNUP, DEFAULT); siteEvent maps
page_view, add_to_cart, initiate_checkout and purchase, while view_content, search and
add_payment_info answer 400 (Google has no category for them). Stored fields: name,
type, defaultValue, currency, alwaysUseDefaultValue, clickWindowDays (1 to 90),
viewWindowDays (1 to 30), primary, countingType, enabled. Actions are created enabled
(enabled: false answers 400); Google blocks the HIDDEN status on WEBPAGE actions. Names
are unique per account, so a replay answers 400 (DUPLICATE_NAME) instead of creating a
second one.
Pinterest (platform pinterestads): creates an advertiser defined event on the tag's ad
account. Fields: name (1-100 letters, digits, _ or -, case-insensitive, max 15 per
ad account) and type (one of Pinterest's optimizable types: SIGNUP, ADD_TO_CART, LEAD,
CHECKOUT, SUBSCRIBE, ADD_TO_WISHLIST, ADD_PAYMENT_INFO, INITIATE_CHECKOUT, CONTACT,
CUSTOMIZE_PRODUCT, FIND_LOCATION, SCHEDULE, SUBMIT_APPLICATION, START_TRIAL, PAGE_VISIT,
VIEW_CATEGORY, VIEW_CONTENT, SEARCH, WATCH_VIDEO) or siteEvent. A duplicate name answers
400.
TikTok: POST /pixel/event/create/. type is a TikTok pixel event type (SHOPPING,
ON_WEB_CART, ON_WEB_DETAIL, INITIATE_ORDER, ADD_BILLING, ON_WEB_SEARCH, PAGE_VIEW,
ON_WEB_REGISTER, FORM, ...), or pass siteEvent. Stores name (at most 40 characters),
defaultValue and currency (USD, JPY or INR only). TikTok returns no id: the new event
is read back from the pixel, and while TikTok's listing has not refreshed the response
carries an empty id and status: pending.
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).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Conversion event fields. Each platform stores a subset; a field it does not store answers 400 naming the supported ones.
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.createTrackingTagEvent({ path: { accountId: 'account_abc123', tagId: 'tag_abc123', }, body: { adAccountId: 'adaccount_abc123', name: 'Example', type: 'string', },});console.log(data);{ "platform": "string", "event": { "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" }}List conversion events
The tag's conversion events, on platforms where each conversion is its own object: Google conversion actions, LinkedIn conversion rules, X web event tags, OpenAI event settings, TikTok pixel events, Meta custom conversions, Pinterest advertiser defined events. OpenAI Ads: the account's conversion event settings whose source is this pixel. `siteEventId` is the event name the site sends (a standard event such as `order_created`, or the lowercase custom event name); `clickWindowDays` is the attribution window. LinkedIn (`linkedinads`): the conversion rules of the ad account (`adAccountId`, default the account that created the tag), including Conversions API and URL-match rules. `siteEventId` (the rule id a page fires) is set only on event-specific Insight Tag rules; `defaultValue`/`currency` come from the rule value, `clickWindowDays`/`viewWindowDays` from its post-click and view-through windows. Meta: the pixel's custom conversions. Meta keeps them per AD ACCOUNT (a pixel has no custom conversions edge), so the list reads `adAccountId` (default: the pixel's owner ad account) and keeps the conversions whose pixel is this one. Archived conversions are included with `status: archived`. `urlContains` and `siteEvent` are parsed from Meta's rule. Google Ads (`googleads`): the enabled WEBPAGE conversion actions of the account; `siteEventId` is the conversion label (the part after `AW-.../` in `send_to`), and value settings, lookback windows, `primary` and `countingType` are returned. Archived (removed) actions are listed with status `REMOVED`; imported (GA4, upload, app) actions are not events of the tag. Pinterest (platform `pinterestads`): the ad account's advertiser defined events, custom event names mapped to a standard type (`type`, e.g. `SIGNUP`). They belong to the ad account, so every tag on it shares them. `id`, `name` and `siteEventId` are all the event name, which the site sends as `pintrk('track', '<name>')` or the Conversions API sends as `event_name`. Standard events (`pagevisit`, `checkout`...) need no object and are not listed. TikTok: the pixel's events from `/pixel/list/`. TikTok refreshes this list every 2 to 4 hours, so a just-created event can be missing. `siteEventId` is the `ttq.track()` name the site fires.
Update a conversion event
Partial update; at least one field. A field the platform does not store answers 400. OpenAI Ads answers 501: OpenAI documents only list and create for event settings, and `POST`/`PATCH`/`PUT /v1/conversions/event_settings/{id}` answer 404 "Invalid URL". Create a new event instead. LinkedIn (`linkedinads`): partial update of the conversion rule; same fields as create. Pass `adAccountId` when the rule lives in another ad account than the one that created the tag. Meta: only `name` and `defaultValue` can change (Meta's custom conversion update takes nothing else); `type`, `siteEvent` and `urlContains` answer 400, create a new event instead. Google Ads (`googleads`): same fields as create, on the account's WEBPAGE actions (others answer 404). `enabled: false` archives the action (same as DELETE) and `enabled: true` restores an archived one. Pinterest (platform `pinterestads`): remaps the event to another `type` or `siteEvent`. Pinterest identifies the event by its name, so `name` cannot change (400): create the new name and delete the old one. TikTok: `name`, `defaultValue` and `currency` (USD, JPY or INR); the type cannot change (delete and recreate).