Tracking Methods
Upstack captures events through two complementary methods:Customer Events API (Checkout)
Shopify’s official Customer Events API provides real-time checkout events. This is the most reliable method for conversion tracking and captures:- Checkout started, progressed, and completed
- Payment information entered
- Shipping information entered
- Cart interactions during checkout
URL-Based Detection (Storefront)
For storefront browsing, Upstack automatically detects page types based on URL patterns:| URL Pattern | Event Fired |
|---|---|
/products/* | view_content |
/collections/* | view_category |
/cart | view_cart |
/search?* | search |
Event Mapping
The following table shows all automatically captured events:| Customer Action | Upstack Event | Data Captured |
|---|---|---|
| Views any page | page_view | URL, title, referrer |
| Views a product page | view_content | Product ID, name, price, variant, URL |
| Views a collection | view_category | Collection handle, URL |
| Searches the store | search | Search query, results count |
| Views their cart | view_cart | All cart items, cart value, currency |
| Adds item to cart | add_to_cart | Product ID, name, price, quantity, variant |
| Removes item from cart | product_removed_from_cart | Product ID, quantity removed |
| Starts checkout | initiate_checkout | Cart items, value, currency |
| Enters contact info | add_shipping_info | Email, phone (+ triggers identity capture) |
| Enters shipping address | add_shipping_info | Address fields (+ triggers identity capture) |
| Selects shipping method | add_shipping_info | Shipping tier selection |
| Enters payment info | add_payment_info | Payment method type (no card data) |
| Completes order | purchase | Full order: items, value, tax, shipping, customer |
Data Payloads
The JSON examples below show destination wire format — what Meta CAPI, TikTok, and other destinations receive after Upstack transforms the event. Event names are converted to PascalCase (e.g.,
AddToCart) for destination compatibility. When using the SDK directly, always use snake_case (e.g., add_to_cart).Product View (view_content)
Automatically captured when a visitor views any /products/* page:
Add to Cart (add_to_cart)
Captured when a visitor adds an item to their cart:
Checkout Started (initiate_checkout)
Captured when checkout begins:
Purchase (purchase)
Captured when an order is completed:
Identity Capture
When customers enter contact information during checkout, Upstack automatically:- Captures email and phone from the contact info step
- Associates the session with the customer identity
- Persists identity for cross-session attribution
Identity data enables cross-device attribution and improves match quality with ad platforms like Meta and TikTok.
Consent Handling
Upstack respects Shopify’s customer consent settings:- If analytics consent is not granted, tracking is limited to essential events
- Marketing consent affects which destinations receive forwarded events
- Consent state is captured and included with each event
What’s NOT Automatically Tracked
The following events require manual implementation:| Event | Why Not Automatic | How to Track |
|---|---|---|
| Product list views | No standard Shopify event | Call _upstack('track', 'view_item_list', {...}) |
| Newsletter signups | Form depends on theme | Use Form Capture Integrations or manual tracking |
| Wishlist actions | Third-party apps vary | Call _upstack('track', 'add_to_wishlist', {...}) |
| Custom conversions | Business-specific | Define and track custom events |
Related Documentation
Standard Events
Full reference with JavaScript snippets for manual event tracking.
JavaScript SDK
Complete API reference for the Upstack JavaScript SDK.
Properties & Context
Reference for item arrays, customer data, and auto-captured fields.
Custom Events
Track custom interactions beyond the standard taxonomy.
Form Capture Integrations
Automatic lead capture from Klaviyo, Postscript, and more.
Connect Shopify
Initial setup guide for connecting your Shopify store.