OverviewProductsPlatformsAPI ReferenceResources
Pixels & Tracking Tags

Update a conversion event

PATCHhttps://zernio.com/api/v1/accounts/{accountId}/tracking-tags/{tagId}/events/{eventId}

Changes a conversion event's settings, such as its name or default value, where the platform allows edits.

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).

X Ads (platform xads): the same fields as create. Events X auto-created with the pixel cannot be changed (400).

PlatformsMetaGoogleTikTokLinkedInPinterestXOpenAI

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

accountIdstringRequired
tagIdstringRequired
eventIdstringRequired

Event id (TrackingTagEvent.id).

Body

application/json
Optional parameters10 fields
adAccountIdstring

Scopes the lookup on platforms whose tag ids live inside an ad account.

namestring, max 200
typestring

The platform's own event type enum value (e.g. PURCHASE).

siteEventstringOne of page_view | view_content | add_to_cart | search | initiate_checkout | add_payment_info | purchase

Neutral alternative to type, mapped to the platform's closest type.

enabledboolean
defaultValuenumber
currencystring

ISO 4217 code.

clickWindowDaysinteger
viewWindowDaysinteger
urlContainsstring, max 500

Fire only on pages whose URL contains this text (case-insensitive).

Responses

Success· the request worked

Errors· the request failed

Create a conversion event

Creates a conversion event on a tracking tag, such as a purchase or lead, so ads can measure and optimise toward it. 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 or, for anything else, the custom event name itself (1 to 64 letters, digits, underscores or dashes; stored lowercase). Standard events: `order_created`, `lead_created`, `items_added`, `contents_viewed`, `checkout_started`, `registration_completed`, `subscription_created`, `trial_started`, `appointment_scheduled`, `page_viewed`, `app_installed`, `app_opened`. `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` - `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. 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 - `type` or `siteEvent`: `type` is 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 A duplicate name answers 400. ### TikTok Calls `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. While TikTok's listing has not refreshed, the response carries an empty `id` and `status: pending`. ### X Ads (platform `xads`) Creates a web event tag. Fields: - `name` - `type` or `siteEvent`. `type` is an X enum: ADDED_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, CHECKOUT_INITIATED, CONTENT_VIEW, CUSTOM, DOWNLOAD, INSTALL, LANDING_PAGE_VIEW, LOGIN, PRODUCT_CUSTOMIZATION, PURCHASE, SEARCH, SESSION, SIGN_UP, SITE_VISIT, START_TRIAL, SUBSCRIBE - `clickWindowDays`: 1, 7, 14, 30, 60 or 90; default 30 - `viewWindowDays`: 0, 1, 7, 14, 30, 60 or 90, at most the click window; default 1 Retargeting is enabled, as in Events Manager.

Delete a conversion event

Removes a conversion event from a tracking tag, or archives or disables it on platforms that have no hard delete. 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 Ads answers 501: TikTok's `/pixel/event/delete/` answers OK but leaves the event on the pixel, so nothing is deleted. Delete the event in TikTok Events Manager. X Ads (platform `xads`): deletes the web event tag for good. Events X auto-created with the pixel cannot be deleted (400). X keeps the event's own website tag id on the account (it has no delete for website tags), left without a conversion event.

PATCH/v1/accounts/{accountId}/tracking-tags/{tagId}/events/{eventId}
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"  }}
OpenAPI specification
Was this page helpful?