Skip to main content
A Shopify install has three parts. All three must be complete before an order carries a campaign.

Before you start

You need the Shopify admin, permission to install apps, and your permanent myshopify.com domain. Use that domain even when customers visit a custom domain.

Connect the store

1

Open Sources

In Datalyr, open Sources, find Shopify, and select connect.
2

Enter the shop domain

Type mystore.myshopify.com in shop domain. Select Connect Shopify.
3

Authorize in Shopify Admin

Shopify lists five permissions. Approve them.
Datalyr requests exactly these five scopes. The connection registers 10 webhooks against Shopify Admin API version 2026-07. A missing webhook fails the connection. A failed Web Pixel install does not.

Turn on the App Embed

Turn on the App Embed before you spend on ads. Orders import without it, so revenue looks correct while every order arrives with no campaign and no click ID. Nothing recovers the visit afterwards.
1

Open the theme editor

Use the Turn on storefront tracking prompt in Datalyr, or open the theme editor in Shopify.
2

Turn on Datalyr

Open App embeds. Turn on Datalyr.
3

Save the theme

Select Save.
4

Load the storefront once

Open the storefront in a browser. This writes the __dl_visitor_id cookie.

How an order joins a visit

The App Embed writes five cart attributes. Shopify promotes them to the order. Datalyr resolves the visitor in this order, and stops at the first match. No match sets visitor_id to shopify_<customer_id>, and the order joins no journey.
Only Meta identifiers reach the cart attributes. gclid and ttclid depend on the visitor lookup or on landing_site.

What each part sends

purchase carries order.total_price. That total includes tax and shipping, and excludes discounts. It is not reduced by refunds. A refund arrives separately as order_refunded with a negative value. The webhook owns revenue and the Web Pixel owns the funnel, so the pixel’s checkout_completed carries no value.

Verify

  1. Open the storefront in a private window with ?utm_source=docs_test.
  2. Confirm a pageview arrives in Events.
  3. Place a test order through Shopify’s test payment flow.
  4. Find the purchase event. Confirm its order ID, value, and currency.
  5. Open the person in Users. Confirm the visit and the order share one journey.

When it does not work

Next