add_to_wishlist event instead.
Two types of custom events exist:
- User-defined custom events — Events you create and fire manually for business-specific interactions
- Upstack-generated events — Events like
nc_purchaseandrc_purchasethat Upstack fires automatically alongside standard events
Naming Conventions
Custom event names follow these rules:- Use snake_case:
quiz_complete,loyalty_redeem,product_config_saved - Keep names descriptive and specific:
product_config_savedis better thancustom_action_1 - Avoid names that collide with standard events —
page_view,purchase, etc. are reserved - Maximum length: 64 characters
- Allowed characters: letters, numbers, underscores
Tracking Custom Events
Pass the event name and properties directly to thetrack() method:
user_data), timestamps, and context fields. You only provide the event name and properties.
For best compatibility with destinations, reuse standard property names (items, value, currency) wherever they apply — destination content IDs are built from items[], not from a top-level content_ids property.
How Custom Events Flow Through the Pipeline
Custom events follow the exact same path as standard events:- Capture — The Upstack Pixel sends the event to the edge API. You can fire custom events using the JavaScript tracking API on your storefront.
- Resolve — Upstack ID attaches identity data to the event. Session stitching and cross-device linking work the same as for standard events.
- Enrich — UTM parameters, click IDs, and product catalog data are merged if applicable
content_idsare present. - Activate — The event is forwarded to destinations that accept custom events.
Destination Support
Not all destinations handle custom events the same way:Meta and TikTok ad optimization algorithms work best with standard events. Use custom events for audience building and measurement, but rely on standard events (Purchase, AddToCart, etc.) for campaign optimization signals.
Firing Custom Events
To fire a custom event from your storefront, use the Upstack JavaScript API:user_data) are attached automatically — you only need to provide the event name and custom_data properties.
Upstack-native custom purchase events
Shopify-specific feature — The
nc_purchase and rc_purchase events are only available for Shopify stores using the Upstack Shopify app. Customer status comes from Upstack’s own customer records, built from tracked purchases plus imported Shopify orders — Upstack doesn’t look up the customer’s order history in Shopify at purchase time.purchase event.
nc_purchase
nc_purchase
Fires when an order is placed by a customer Upstack has no customer record for. Used to optimize Meta campaigns toward new-customer acquisition instead of repeat buyers.When it fires: On each purchase, when Upstack finds no record of the customer in its own customer records (built from tracked purchases plus imported Shopify orders).Properties: Same payload as the standard
Purchase event (value, currency, items, orderId, etc.) plus Upstack’s identity enrichment (em, ph, fn, ln, fbc, fbp, client_ip_address, client_user_agent).See Set up custom events → NC Purchase for Meta setup steps.rc_purchase
rc_purchase
Fires when an order is placed by a customer Upstack already has a customer record for. Used for retargeting audiences, retention measurement, and keeping prospecting campaigns honest about who they’re actually converting.When it fires: On each purchase, when Upstack finds the customer in its own customer records (built from tracked purchases plus imported Shopify orders).Properties: Same payload as the standard See Set up custom events → RC Purchase for Meta setup steps.
Purchase event (value, currency, items, orderId, etc.) plus Upstack’s identity enrichment (em, ph, fn, ln, fbc, fbp, client_ip_address, client_user_agent).What destinations receive (internal format):The standard
purchase event still fires for every order regardless of customer status. nc_purchase and rc_purchase fire in addition to purchase, not instead of it.AOV-Segmented Purchase Events
Upstack has built-in measures for five order-value event names —high_aov_purchase, low_aov_purchase, p70_aov_purchase, p80_aov_purchase, and p90_aov_purchase — but it doesn’t generate these events automatically or calculate AOV thresholds from your order history. To use one, create it with a global event mapping on purchase with an order-value condition.
See AOV purchase events for the event names, their built-in measures, and setup steps.
Customer Behavior Purchase Events
Upstack automatically segments purchases by customer behavior patterns.upsell_purchase
upsell_purchase
Fires when a customer accepts a post-purchase offer that adds items to an order Upstack has already sent as a Purchase.When it fires: On a Shopify order update for the same order, when the order has the
AfterSell Upsell tag and its new total is higher than the Purchase value already sent.Properties: Same payload as the original Purchase event, except value is only the added amount and items lists only the added line items.Use case: Measure upsell effectiveness; optimize campaigns toward customers likely to accept upsells.See How post-purchase upsells are tracked for how Upstack detects an upsell.lapsed_purchase
lapsed_purchase
Fires when a previously inactive customer returns and makes a purchase.When it fires: On a purchase, when the customer’s previous order was created 12 or more calendar months earlier.Properties: Same payload as the standard
Purchase event.Use case: Measure win-back campaign effectiveness; build audiences of re-engaged customers.Related Documentation
Standard Events
Review the full list of built-in events before creating a custom event.
JavaScript SDK
Full track() method reference with all 7 parameters.
Properties & Context
See all available property fields you can include in custom_data.
Shopify Automatic Tracking
Events automatically tracked on Shopify stores.