Skip to content

Checkout & analytics

Visitors add items, check out through Shopify, and every interaction is tracked — from first page view through order completion.

Checkout flow

  1. Visitor adds items via FmCartAddButton
  2. Framerce manages cart state client-side and syncs it to Shopify via the Storefront API
  3. Visitor clicks checkout (FmCartCheckout) and Shopify handles payment, shipping, and order creation

Framerce creates the cart and hands off to Shopify's secure hosted checkout.

Analytics

Framerce tracks standard e-commerce events automatically. Every component interaction — viewing a product, adding to cart, starting checkout — fires a canonical event that each provider translates to its own format.

EventTrigger
page_viewedPage load
product_viewedProduct detail page
product_added_to_cartAdd to cart click
product_removed_from_cartRemove from cart
cart_viewedCart drawer opened
checkout_startedCheckout button clicked
checkout_completedOrder confirmed (via Web Pixel)

Why this matters

These events power three outcomes:

  • Conversion optimization — See where visitors drop off (viewed → carted → checked out) and fix the bottleneck
  • Ad attribution — Triple Whale tracks which ad brought each visitor, through to purchase, so you know your actual return on ad spend
  • Retargeting — PostHog and Triple Whale build audiences from event data (e.g., "added to cart but didn't buy") for retargeting campaigns

Supported providers

ProviderRoleSetup
PostHogProduct analytics, funnels, session replaysEnter project API key in plugin settings
Triple WhaleAd spend attribution, ROAS trackingEnter pixel ID in plugin settings
ShopifyNative checkout tracking via Web PixelAutomatic — reads cart attributes and cookies

Identity across checkout

Shopify's checkout runs on a separate domain, which normally breaks tracking. Framerce preserves identity through the redirect:

  1. A device ID is stored in the visitor's browser and synced to Shopify cart attributes
  2. The checkout URL is decorated with the device ID as a query parameter
  3. Shopify's Web Pixel reads the ID on the checkout page and links it back to the pre-checkout session

UTM parameters from the visitor's original landing are preserved through the same mechanism.

Configure providers

Enter your PostHog project key or Triple Whale pixel ID in the Framerce plugin settings. The bootloader initializes each provider and the runtime dispatches events as visitors interact with components.

Events not appearing?

Verify your provider key in the plugin settings. For PostHog, check that your project key matches the one in PostHog → Settings → Project API Key.

What's next

Released under the MIT License.