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:
wishlist_add,quiz_complete,loyalty_redeem - 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 (content_ids, value, currency, content_name) wherever they apply.
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:| Destination | Custom Event Support |
|---|---|
| Meta CAPI | Supported as Custom event type. Meta receives the custom event name and all properties. Useful for building custom audiences and optimization. |
| TikTok Events API | Supported. Custom events can be used for audience building but not standard optimization. |
| Klaviyo | Fully supported. Custom events appear as distinct metric types in Klaviyo for flow triggers and segmentation. |
| GA4 | Supported. Custom event names map directly to GA4 custom events. Properties become event parameters. |
| Webhook | Fully supported. The raw event payload is forwarded as-is. |
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. They rely on Shopify order history to determine customer status.purchase event.
nc_purchase
nc_purchase
Fires when an order is placed by a customer with no prior completed order history. Used to optimize Meta campaigns toward new-customer acquisition instead of repeat buyers.When it fires: Order confirmation, when the customer has zero prior completed orders in Shopify.Properties: Same payload as the standard
Purchase event (value, currency, content_ids, order_id, 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 with one or more prior completed orders. Used for retargeting audiences, retention measurement, and keeping prospecting campaigns honest about who they’re actually converting.When it fires: Order confirmation, when the customer has at least one prior completed order in Shopify.Properties: Same payload as the standard See Set up custom events → RC Purchase for Meta setup steps.
Purchase event (value, currency, content_ids, order_id, 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 automatically generates AOV (Average Order Value) segmented purchase events based on your store’s order history. These events help you optimize campaigns toward high-value orders.high_aov_purchase
high_aov_purchase
Fires when an order’s value exceeds your store’s historical average order value threshold.When it fires: Order confirmation, when
order_value > store_aov_threshold.Properties: Same payload as the standard Purchase event.Use case: Optimize Meta campaigns toward customers who place high-value orders, not just any orders.low_aov_purchase
low_aov_purchase
Fires when an order’s value falls below your store’s historical average.When it fires: Order confirmation, when
order_value < store_aov_threshold.Properties: Same payload as the standard Purchase event.Use case: Exclude from high-value optimization campaigns; analyze patterns in low-value conversions.p70_aov_purchase
p70_aov_purchase
Fires when an order’s value exceeds the 70th percentile of your store’s order values.When it fires: Order confirmation, when
order_value >= p70_threshold.Properties: Same payload as the standard Purchase event.Use case: Target campaigns toward top 30% of orders by value.p80_aov_purchase
p80_aov_purchase
Fires when an order’s value exceeds the 80th percentile of your store’s order values.When it fires: Order confirmation, when
order_value >= p80_threshold.Properties: Same payload as the standard Purchase event.Use case: Target campaigns toward top 20% of orders by value.p90_aov_purchase
p90_aov_purchase
Fires when an order’s value exceeds the 90th percentile of your store’s order values.When it fires: Order confirmation, when
order_value >= p90_threshold.Properties: Same payload as the standard Purchase event.Use case: Target campaigns toward your highest-value orders (top 10%).Customer Behavior Purchase Events
Upstack automatically segments purchases by customer behavior patterns.upsell_purchase
upsell_purchase
Fires when an order contains upsell or cross-sell items that were added after the initial product selection.When it fires: Order confirmation, when upsell/cross-sell items are detected in the cart.Properties: Same payload as the standard
Purchase event, plus identification of which items were upsells.Use case: Measure upsell effectiveness; optimize campaigns toward customers likely to accept upsells.lapsed_purchase
lapsed_purchase
Fires when a previously inactive customer returns and makes a purchase.When it fires: Order confirmation, when the customer has been inactive for a defined period (typically 90+ days since last order).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.