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).
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Event id (TrackingTagEvent.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.updateTrackingTagEvent({ path: { accountId: 'account_abc123', tagId: 'tag_abc123', eventId: 'event_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" }}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`.
Delete a conversion event
Removes the conversion event. Platforms without a hard delete archive or disable it instead; `state` in the response says which (`deleted`, `archived`, `disabled`). OpenAI Ads answers 501: there is no delete or archive route for event settings (`DELETE /v1/conversions/event_settings/{id}` and `POST .../{id}/archive` answer 404 "Invalid URL"). Archive the event in OpenAI Ads Manager. LinkedIn (`linkedinads`): LinkedIn has no delete for conversion rules (not in the conversion-tracking API, and `DELETE /rest/conversions/{id}` has no route), so the rule is disabled (`enabled: false`) and `state` is `disabled`. Re-enable it with `enabled: true`. Meta: `archived`. Meta's delete archives the custom conversion (it stays readable with `status: archived`) and there is no hard delete; deleting an archived one is a no-op. Google Ads (`googleads`): removes the conversion action (state `archived`). Google keeps it with status REMOVED and its history; PATCH with `enabled: true` restores it. Deleting an already archived action succeeds without a call to Google. Pinterest (platform `pinterestads`): stops Pinterest tracking the event name (`state: disabled`); Pinterest keeps the event's history. TikTok: hard delete (`/pixel/event/delete/`); TikTok refuses events bound to an ad group (400).