Shopify CDP Connector Events Spec
Events mapping from Shopify WebPixel and Webhooks to CDP Connector Events
Attribution leverages the industry-standard Segment V2 Ecommerce Spec to implement events based on data available from Shopify. While a strict 1:1 mapping of all Shopify events to the Segment Spec isn't always possible, Attribution aims to reconcile both models in a way that preserves analytical integrity. Some deviations exist, but they are designed to reflect the most meaningful interpretation of Shopify data within the Segment framework.
Shopify Web Pixel Events
These are website events captured by Shopify when a visitor interacts with your Storefront.
Standard Events
Shopify reference: Standard Events
Shopify Web Pixel Event | CDP Event | Properties |
---|---|---|
cart_viewed | Cart Viewed | cart_id , products[] |
checkout_address_info_submitted | Checkout Step Completed | checkout_token ,shopify_step (set to checkout_address_info_submitted ) |
checkout_completed | Checkout Step Completed | checkout_token ,shopify_step (set to checkout_completed ) |
checkout_contact_info_submitted | Checkout Step Completed | checkout_token ,shopify_step (set to checkout_contact_info_submitted ) |
checkout_shipping_info_submitted | Checkout Step Completed | checkout_token ,shopify_step (set to checkout_shipping_info_submitted ) |
checkout_started | Checkout Started | checkout_token , order_id , revenue , shipping , tax , currency , products[] |
collection_viewed | Product List Viewed | list_id , category , products[] |
payment_info_submitted | Payment Info Entered | checkout_token |
product_added_to_cart | Product Added | Product properties |
product_removed_from_cart | Product Removed | Product properties |
product_viewed | Product Viewed | Product properties |
search_submitted | Products Searched | query |
page_viewed | Loaded a Page | For Segment this event is fired by the native library (analytics.js). You can switch to Web Pixel trigger with Send pageviews from Web Pixel setting enabled. url , referrer , search , title |
Enabling to send page_viewed
using Web Pixel could be beneficial for tracking accuracy because it allows to bypass most ad blockers and is less affected by network latency, however this disables running native tracking library on the website which in case of Segment means that all events would be fired in "Cloud-mode" so some Segment destinations that depend on "Device mode" would not be running on your shopify pages, please learn more on Segment Connection modes.
(Attribution only) page_viewed
is fired from by Pixel event by default.
Additionally shopify_event
property is present on all events and includes original Shopify Web Pixel Event name. The shopify_event_data
property could be added to all events if Send raw Shopify Event data setting enabled which will include original Shopify event payload.
Product properties
Product properties are extracted from CartLine[]
, CheckoutLineItem[]
and ProductVariant
depending on event. url
and image_url
will have window.location.origin
prepended if relative url is provided by Shopify.
Key (name) | Value |
---|---|
product_id | variant.product.id |
sku | variant.sku |
category | variant.product.type |
name | variant.product.title |
brand | variant.product.vendor |
variant | variant.title |
price | variant.price.amount |
url | variant.product.url |
image_url | variant.image.src |
quantity | line.quantity |
position | index + 1 |
coupon | not available |
DOM Pixel Events
Shopify Form Submitted is fired every time any form is submitted on the website, this often includes, subscribe to newletter forms, product variant selection is implemented using the forms, login.
You can disable sending these event by turning off Track Shopify "form_submitted" DOM event setting.
Shopify reference: DOM Pixel Events API
Shopify Web Pixel Event | CDP Event | Properties |
---|---|---|
form_submitted | Shopify Form Submitted | form_id HTML <form> element id ,other* (form inputs with name set would be attached as properties) |
Custom Events
You can also capture and fire custom events using Shopify.analytics.publish() method. Please note that some Apps installed on your store could fire custom events as well. Disable Track custom Shopify events setting to stop sending custom events.
Shopify reference: Emitting Data
Shopify Web Pixel Event | CDP Event | Properties |
---|---|---|
CUSTOM_NAME | Shopify: CUSTOM_NAME | customData passed to event |
Webhook events
These events are implemented by subscribing to Shopify Webhook topics.
Shopify reference: Webhooks
Shopify Webhook Topic | CDP Event |
---|---|
orders/cancelled | Order Cancelled |
orders/create | Order Created |
orders/delete | Order Deleted |
orders/edited | Order Edited |
orders/edited | Order Updated (Segment only) |
orders/fulfilled | Order Fulfilled |
orders/paid | Order Paid |
orders/paid | Order Completed (Segment only) |
orders/partially_fulfilled | Order Partially Completed |
refunds/create | Order Refunded |
Properties availability could vary depending on webhook topic.
Order Refunded has negative revenue
property.
Order Completed event can be configured by Webhook to trigger "Order Completed" event setting to be fired on orders/paid
(default) or orders/fulfilled
topics.
(Attribution only) The Estimated First Order event is triggered on the orders/paid
webhook when a Shopify customer has prior orders that were not previously tracked. This synthetic event uses the customer's original created_at
timestamp and sets revenue
to 0.01
, allowing Attribution to distinguish first-time purchases from repeat ones.
Order properties
checkout_id
order_id
- Shopify Order name (not to be confused with "number" and "order_number")- affiliation - not available
subtotal
total
revenue
shipping
tax
discount
coupon
currency
products[]
- see Product properties
Product properties
product_id
sku
- category - not available
name
brand
- this maps to "vendor" in Shopifyvariant
price
quantity
coupon
position
url
image_url
- sometimes not available
Additionally there are out properties added:
shopify_order_id
- Shopify internal Order IDshopify_refund_id
checkout_id
checkout_token
source_name
Identity resolution
Identity is resolved as soon as it's known. For new customers, this typically occurs when they place their first order or sign up. For existing users, identity resolution happens when they sign in or complete a repeat purchase. Additionally, all webhook events are followed by identify()
calls to enrich customer traits, including:
shopify_customer_id
email
first_name
last_name
created_at
address
country
state
city
postal_code
street
The USER_ID
value is controlled by the User ID source setting, which lets you choose which trait to use as the unique identifier: email
, shopify_customer_id
, or none
. This flexibility ensures alignment with your CDP’s identity resolution strategy and downstream analytics.
Updated 17 days ago