TrustData
Connectors

Shopify

Connect your Shopify store to install the TrustData pixel, receive order events and sync store data.

Connect a Shopify store to track shopper events with the TrustData pixel and to receive order events from Shopify. TrustData matches each order to the visit that led to it, and syncs store data on a schedule.

What the connection does

One connection does three things:

  • Installs the TrustData pixel in your store. The pixel captures shopper events in the browser.
  • Receives order and customer events from Shopify, so purchases, refunds and cancellations reach TrustData from the server.
  • Syncs store data: orders, customers, products and discounts.

The pixel and the order events share a checkout token. TrustData uses it to match an order to the visit that placed it.

Before you start

You need:

  • A Shopify store where you can install apps
  • A TrustData property with an Attribution ID. The pixel and the order events send their data to this Attribution ID

Connect your store

  1. Go to Settings → Data Sources
  2. Click Connect on the Shopify card
  3. Under Shop name, enter your store name, for example mystore or mystore.myshopify.com
  4. Click Connect Shopify store
  5. Log in to Shopify if Shopify asks you to
  6. Review the permissions TrustData requests, then click Install app
  7. Back in TrustData, enter a Data Source Name
  8. Select the Attribution ID that receives events from this store
  9. Optional: under Advanced options, turn on Debug Mode
  10. Click Connect

TrustData then creates the pixel in your store, or updates it if one already exists. It registers the webhooks when you install the app. If the pixel setup fails, TrustData still connects the store and shows a warning that the pixel needs manual setup in your Shopify admin.

Permissions requested

TrustData requests these Shopify permissions:

PermissionUsed for
read_ordersReading orders
read_customersReading customers
read_productsReading products
write_pixelsCreating the TrustData pixel in your store
read_customer_eventsLetting the pixel read shopper events

Pixel

The pixel runs in Shopify's customer events sandbox. TrustData sets three options when it creates the pixel:

OptionValue
Server URLhttps://t.trustdata.tech
Attribution IDThe Attribution ID you selected
Debug Modetrue if you turned on Debug Mode, otherwise false

The pixel sends these Shopify events to TrustData:

Shopify eventTrustData event
page_viewedpage_view
product_viewedview_item
collection_viewedview_item_list
search_submittedsearch
product_added_to_cartadd_to_cart
product_removed_from_cartremove_from_cart
cart_viewedview_cart
checkout_startedbegin_checkout
checkout_contact_info_submittedadd_contact_info
checkout_address_info_submitted and checkout_shipping_info_submittedadd_shipping_info
payment_info_submittedadd_payment_info
checkout_completedpurchase

The purchase event carries the transaction ID, tax, shipping, the checkout token and whether it is the customer's first order.

The pixel reads each visitor's Shopify consent choices for analytics, marketing, preferences and sale of data. It sends them with every event. Without analytics consent, the pixel does not send a visitor ID.

Debug mode

Debug Mode writes pixel messages that start with [TrustData] to the browser console. Turn it on while you test, then turn it off.

Order and customer events

Shopify sends these webhooks to TrustData:

Shopify topicWhat TrustData records
orders/paidA purchase. If the order already has refunds, a refund
orders/updatedAn order update, a refund if the order has refunds or its status is refunded or partially_refunded, or a cancellation if the order has a cancellation time
orders/cancelledA cancellation, with a negative value
customers/createA new customer

TrustData ignores an orders/updated or orders/cancelled event for an order whose payment status is pending, because that order is not a sale yet. Cash on delivery orders count when Shopify sends orders/paid.

TrustData also receives app/uninstalled and Shopify's data privacy requests (customers/data_request, customers/redact and shop/redact).

Synced data

TrustData syncs these Shopify data sets every 3 hours:

Data setDescription
OrdersOrders with line items
CustomersCustomer details used to identify returning shoppers
TransactionsPayment transactions
ProductsCatalog with variant prices and availability
Inventory levelsStock per location
Price rulesPromotion setup
Discount codesPromotion codes

The first sync reads the last 90 days. Later syncs re-read the last 30 days, so late updates reach TrustData.

Uninstall the app

When you uninstall the TrustData app from Shopify, Shopify notifies TrustData. TrustData turns off the Shopify data source and adds an entry to your change history, titled "TrustData app uninstalled from Shopify". Attribution analysis excludes the surrounding period.

Troubleshooting

No pixel events appear

  1. In your Shopify admin, check that the TrustData pixel exists and is active
  2. Turn on Debug Mode and look for [TrustData] messages in the browser console
  3. Check that you selected the Attribution ID of the right property

Orders are not matched to visits

  • Check that the pixel is active. The pixel sends the checkout token that TrustData uses to match each order
  • Check that the visitor gave analytics consent. Without it, the pixel sends no visitor ID