Skip to main content
Pick this if you sell on Shopify and want to know which campaign paid for each order. When you finish, a campaign visit, the Shopify order it produced, the refund that follows, and the conversion sent to your ad platform all sit on one journey.

Before you start

  • You can install apps and edit the active theme in Shopify.
  • You have the permanent myshopify.com domain, not a custom storefront domain.
  • You can place a Shopify test order.

The path

Follow these five steps in order. Each one links to the page that owns the detail, so this page stays a map rather than a second copy.
Turn on the theme App Embed yourself after you install the app. Without it, dl.js never loads on the storefront, no click ID is captured, and every order reports as direct.
Do not add a manual dl.js snippet on top of the App Embed. Two instances issue two visitor_id values, double the pageviews, and split one journey in half.
Shopify carries the identity in the order note attribute _datalyr_visitor_id. The cart attribute bridge writes it, along with _datalyr_fbc, _datalyr_fbp, and _datalyr_fbclid. When that attribute is absent, we fall back to the email bridge, then to the identity shopify_<customer_id>. A shopify_ identity records the revenue but carries no campaign, which is why step 3 matters.

Verify

  1. Open the storefront in a private window with ?utm_source=shopifytest.
  2. Browse a product and add it to the cart.
  3. Complete a Shopify test order.
  4. Open Conversions and find the order.
  5. Confirm utm_source reads shopifytest.
  6. Confirm value, currency, and the order ID are present.
  7. Refund the test order in Shopify.
  8. Confirm the refund appears and net revenue falls.

When it doesn’t work

Next