Skip to content
adscapi

Canonical events

One fixed vocabulary in your code. adscapi maps each name to the platform's native event (or passes the string through where the platform accepts custom events). You never learn twenty-six event enums.

The vocabulary

Use these names on ConversionEvent.name. Type is CanonicalEventName | string — custom strings are allowed.

NameTypical moment
page_viewLanding / key page load
leadForm submit, demo request
signup_startBegan registration flow
signupAccount created / registration complete
checkout_createdCheckout initiated
purchasePaid order / subscription
reply_generatedProduct-specific engagement (e.g. AI reply)
upgrade_clickedUpgrade CTA clicked
ts
type CanonicalEventName =
  | 'page_view'
  | 'lead'
  | 'signup_start'
  | 'signup'
  | 'checkout_created'
  | 'purchase'
  | 'reply_generated'
  | 'upgrade_clicked';

How mapping works

  • Each platform ships an EventNameMap — a partial record of canonical → native
  • Names with no entry (often signup_start, reply_generated, upgrade_clicked) fall through as the raw canonical string, which platforms that accept custom events keep; fixed-enum platforms may reject them
  • Some platforms (Bing offline goals, X event ids) are advertiser-defined — the map is empty or inert and the string you send must match what you configured in the ads UI

Sample mappings

A slice of major platforms. Omitted cells mean passthrough / no standard fit.

Canonicalmetatiktokga4pinterestlinkedinsnapchatredditchatgpt
page_viewPageViewViewContentpage_viewpage_visitKEY_PAGE_VIEWPAGE_VIEWPAGE_VISITpage_viewed
leadLeadSubmitFormgenerate_leadleadLEADSIGN_UPLEADlead_created
signupCompleteRegistrationCompleteRegistrationsign_upsignupSIGN_UPSIGN_UPSIGN_UPregistration_completed
checkout_createdInitiateCheckoutInitiateCheckoutbegin_checkoutinitiate_checkoutSTART_CHECKOUTSTART_CHECKOUTADD_TO_CARTcheckout_started
purchasePurchasePurchasepurchasecheckoutPURCHASEPURCHASEPURCHASEorder_created

Example

ts
await ads.conversions.track({
  name: 'purchase', // canonical — mapped per platform
  value: 49,
  currency: 'USD',
  user: { email: 'jane@example.com' },
  consent: { adUserData: true, adPersonalization: true },
});

// Custom strings pass through where the platform allows them:
await ads.conversions.track({
  name: 'trial_started',
  consent: { adUserData: true, adPersonalization: true },
});

Related