Skip to main content
The Crave SDK includes a built-in analytics module that tracks key events across the ordering funnel. Use it to measure conversion rates, identify drop-off points, and understand customer behavior.

Event types

The SDK supports four funnel events:
EventWhen to fireFunnel stage
SCANCustomer scans a QR code or visits the storefront URLEntry
CART_VIEWCustomer opens the cart panelConsideration
CHECKOUT_VIEWCustomer reaches the checkout pageIntent
ORDER_PLACEDPayment succeeds and order is createdConversion

Track events with the SDK

The API returns { "status": "accepted" } on success. Events are processed asynchronously.

Where to fire events

Place analytics calls at these points in your storefront:

Custom metadata

The metadata field accepts any key-value pairs. Use it to attach context to events:

Google Analytics integration

Forward Crave events to Google Analytics for unified reporting:

View analytics in the Dashboard

Analytics data is available in the Crave Dashboard under Analytics > Storefront. The dashboard shows:
  • Funnel visualization — conversion rates between each stage
  • Event timeline — raw event stream with metadata
  • Location comparison — performance across multiple locations
  • Time-based trends — daily, weekly, and monthly patterns

Best practices

  • Fire events once — deduplicate using a ref or flag to prevent double-counting on re-renders
  • Don’t block the UI — fire analytics calls without await to keep the interface responsive
  • Include metadata — the more context you attach, the more useful your Dashboard reports
  • Test in test mode — test API keys still record analytics events, visible in the Dashboard

Next steps

Order Tracking

Track order status after checkout.

Deployment

Deploy your storefront and go live.