Shopify analytics event mapping
Audience: Developer and Integrator.
This reference defines the additional data required to map storefront events to Shopify analytics. Complete Shopify host setup and validation first. The application does not supply Shopify’s first-party runtime or visitor session setup.
Add ecommerce reporting separately
Matching event names do not imply matching payloads. Use Shopify’s event payload contracts when you extend the bridge:
| Application event | Shopify event or producer | Required work |
|---|---|---|
page_viewed | AnalyticsEvent.PAGE_VIEWED | Use the page-view bridge. |
product_viewed | AnalyticsEvent.PRODUCT_VIEWED | Map the product GID, title, variant GID, variant title, MoneyV2 price, quantity, and SKU into products. Get the vendor and product type from approved host data. The public event payload has neither field. |
collection_viewed | AnalyticsEvent.COLLECTION_VIEWED | Add the collection handle. The public event payload contains only ID and title. |
cart_viewed | AnalyticsEvent.CART_VIEWED | Supply Shopify’s complete analytics cart snapshot. The public lines and total omit the cart ID and update time. |
product_added_to_cart, product_removed_from_cart | Shopify cart tracking | Connect confirmed before-and-after cart snapshots to Shopify’s supported cart tracking. The action quantity is a delta, not a complete currentLine snapshot. |
search_submitted | No mapping in this example | Shopify’s search-view event requires a search term. The public event contract excludes it. |
checkout_link_clicked | No checkout completion mapping | Shopify checkout reports the actual checkout and order activity. A link action cannot establish either result. |
Keep cart identifiers and session data inside the reviewed host integration. Do not expose cart keys through CMS events. Select one cart-event producer. Shopify’s cart tracker and a manual bridge must not report the same change twice. Follow the cart tracking setup . Add only complete mappings. Stop cart tracking when the integration stops. Missing product fields can cause Shopify to reject an event, including when other destinations receive it. Examine the browser console during validation.
Application event IDs and page-view IDs are not Shopify visitor or session IDs.
The bridge publishes to Shopify’s event bus. It does not use the pixel analytics.subscribe API.
Use the application event reference for the source payloads.