---
title: "Shopify"
description: "Connect Sealmetrics to Shopify via the Pixel app and a theme app embed, with purchases confirmed server-side by webhook — cookieless funnel tracking."
canonical_url: "https://docs.sealmetrics.com/integrations/ecommerce/shopify"
lang: "en"
date_generated: "2026-09-08T10:38:19.827Z"
source_hash: "164eb1f508f943c75812d4817938ddbe24b122bd36a52136264db2997f49f2ba"
content_type: "implementation"
owner: "engineering"
llm_priority: "critical"
source_file: "integrations/ecommerce/shopify.mdx"
publisher: "Sealmetrics"
---

# Shopify

Canonical page: https://docs.sealmetrics.com/integrations/ecommerce/shopify

Privacy-first, cookieless analytics for Shopify stores. Sealmetrics tracks the e-commerce funnel through a Shopify app and a **Theme App Extension** (an "app embed"), with purchases confirmed server-side via a Shopify webhook.

## How it works

The integration has two parts:

- **The Sealmetrics Pixel app** — a Shopify app you install on your store. It handles the connection (OAuth), registers the conversion webhook, and manages billing.
- **The "Sealmetrics Analytics" app embed** — a Theme App Extension you enable in your theme. It injects the Sealmetrics loader, which loads the tracker (`t.js`), writes cart attributes, and fires the e-commerce microconversions.

No shopper-facing UI is rendered. Sealmetrics is invisible by design (privacy-first).

## Requirements

- A Shopify store on a plan that allows app embeds.
- A Sealmetrics account (your **Account ID** — the same value as your Site ID — identifies the site you want to track).

## Connect from the dashboard

Connection is managed from **Settings → Integrations → Shopify** in the Sealmetrics dashboard.

1. Open **Settings → Integrations → Shopify**.
2. Select the **site** you want to connect.
3. Enter your Shopify **domain** (the `mystore` part of `mystore.myshopify.com`) and click **Connect Shopify**.
4. You are redirected to Shopify to install and authorize the app.

Once installed, the store appears as **Connected**, showing the store domain and the connection date, and the **conversion webhook** is registered automatically.

### Disconnecting

How you disconnect depends on how the store was installed:

- **Public-app stores (billed through Shopify):** to disconnect and stop billing, uninstall Sealmetrics from your **Shopify Admin → Settings → Apps**. The dashboard does not expose a Disconnect button for these stores, to keep the Shopify subscription and your Sealmetrics account in sync.
- **Custom-app stores (billed through Sealmetrics):** a **Disconnect** button is available in the dashboard. Disconnecting disables Shopify conversion tracking; you can reconnect later.

## Activate the tracker (app embed)

Connecting the app does not start front-end tracking on its own. You must enable the app embed and provide your Account ID.

1. In the Sealmetrics dashboard (the connected Shopify card), copy your **Account ID**. Use the **Copy** button next to it.
2. In Shopify, open the theme editor and go to **Theme → App embeds**.
3. Enable the **Sealmetrics Analytics** embed. (The dashboard provides an **Activate the embed** button that deep-links to the theme editor.)
4. Paste your **Account ID** into the embed's **Sealmetrics Account ID** field and **Save**.

The embed loads the Sealmetrics loader by account:

```html
<script async src="https://t.sealmetrics.com/shopify-loader.js?account=YOUR_ACCOUNT_ID"></script>
```

The loader then injects the tracker (`t.js`), writes Sealmetrics session attributes to the Shopify cart, and sets up the microconversion listeners described below.

## E-commerce events

Sealmetrics tracks the following events automatically once the app embed is active and the conversion webhook is registered.

| Event | Type | Source | Properties |
|-------|------|--------|------------|
| `pageview` | Auto | Tracker (`t.js`) | Standard pageview |
| `view_product` | Microconversion | App embed loader (on `/products/{handle}` pages) | product_name, sku, price, currency, product_id |
| `add_to_cart` | Microconversion | App embed loader (intercepts `/cart/add`) | product_id, product_name, sku, price, quantity, currency |
| `begin_checkout` | Microconversion | App embed loader (checkout submit/click and `/checkout` requests) | cart_url |
| `purchase` | Conversion | Shopify `orders/create` webhook (server-side) | revenue, currency, items array |

### `view_product`

Fired on product pages (`/products/{handle}`). The loader reads product data from JSON-LD (`@type: "Product"`) and falls back to `ShopifyAnalytics.meta` for the product ID. It also re-fires on SPA navigation between products.

### `add_to_cart`

The loader intercepts `fetch` and `XHR` calls to `/cart/add` and emits one `add_to_cart` per line item, with the price normalized from cents to a decimal value.

### `begin_checkout`

Fired (once per checkout attempt) when the shopper submits the cart form, clicks a checkout link/button, a Shopify dynamic checkout (Buy Now) button, or when a `/checkout` request is detected. A dedup flag prevents duplicate events; it resets on SPA navigation.

### `purchase`

Purchases are confirmed **server-side**, not from the browser. When an order is placed, Shopify sends an `orders/create` webhook to Sealmetrics, which records the conversion with its revenue, currency, and line items. To make this reliable, the app requests the `read_orders` scope and registers the `orders/create` webhook on install.

**Note:**

## Billing

Billing depends on how the store installed Sealmetrics:

- **Public-app stores** are billed through **Shopify Managed Pricing**. After approving a plan in Shopify Admin, the dashboard shows a Shopify billing card to manage the plan. To stop billing, uninstall the app from Shopify Admin.
- **Custom-app stores** are billed on **Sealmetrics** directly. The Shopify page shows a note pointing to **Settings → Billing**, where the plan is managed.

Plans and prices are presented through Shopify's Managed Pricing flow in Shopify Admin. Check the current options there rather than relying on a fixed figure.

## Privacy and compliance

- No cookies are used; tracking is cookieless by design.
- Order IDs are not stored externally.
- The app subscribes to Shopify's mandatory GDPR/compliance webhooks:
  - `customers/data_request`
  - `customers/redact`
  - `shop/redact`

## Troubleshooting

### Tracker not loading

1. Confirm the **Sealmetrics Analytics** app embed is enabled in **Theme → App embeds**.
2. Confirm your **Account ID** is pasted into the embed field and saved (the embed does nothing if it is blank).
3. Check the browser console for the `shopify-loader.js` request and any JavaScript errors.

### Purchases not tracking

1. Confirm the store shows **Connected** in **Settings → Integrations → Shopify** (this means the conversion webhook is registered).
2. Place a test order and verify it appears as a conversion.
3. If you recently reinstalled or changed scopes, reconnect from the dashboard so the `orders/create` webhook is re-registered.

### Orders or revenue don't match Shopify

This is the most common Shopify support question, and the usual advice does not apply here.

**Important:**
On Shopify, `purchase` conversions come from the **`orders/create` webhook**, server-side. They do not depend on the tracker firing on a thank-you page. So the two causes behind most reconciliation issues elsewhere — [the conversion pixel not firing, and the base pixel firing too late](/troubleshooting/erp-crm-database-discrepancy) — **cannot be the explanation on a Shopify store**. Auditing the checkout for pixel problems will not find anything.

Work through these instead:

1. **Confirm the webhook is live.** The store must show **Connected** in **Settings → Integrations → Shopify**. If you reinstalled the app or changed scopes, reconnect from the dashboard so `orders/create` is re-registered. Orders placed while the webhook was not registered are not backfilled.
2. **Check what your Shopify number actually includes.** Shopify's own reports can cover orders from channels and states that may not be part of what you are comparing: point of sale, draft orders created in the admin, marketplace or social channels, and orders that were cancelled, refunded, or never paid. Compare like with like before concluding anything is missing.
3. **Compare the same window in the same timezone.** Sealmetrics rolls the day in the account timezone (**Settings → Account**); Shopify rolls it in the store timezone. If they differ, totals shift around the day boundary.
4. **Check the currency.** If your store sells in several currencies, confirm which one the figure you are comparing is expressed in.
5. **Place a test order and follow it.** Put a real order through the same flow your customers use, note the exact time and amount, and check whether it appears in Sealmetrics. This separates "the integration is not receiving orders" from "the two numbers count different things" faster than anything else.

If a test order does not show up, contact **support@sealmetrics.com** with its date, time, and amount, and we will trace the webhook delivery.

### Microconversions missing

1. `view_product` only fires on `/products/{handle}` pages — confirm you are testing a product page.
2. `add_to_cart` relies on standard `/cart/add` requests; heavily customized themes that bypass the standard cart endpoints may not be detected.
3. Verify no JavaScript errors in the browser console interrupt the loader.

## Related documentation

- [Installation](/implementation/tracker/installation) — how the Sealmetrics tracker (`t.js`) that this app embed loads works under the hood.
- [E-commerce Conversion Tracking](/implementation/ecommerce-conversion-tracking) — the funnel-event model behind the microconversions and purchase webhook.
- [WooCommerce](/integrations/ecommerce/woocommerce) — the equivalent integration for WordPress + WooCommerce stores.
- [BigCommerce](/integrations/ecommerce/bigcommerce) — another hosted-store platform integration.
- [Integrations Overview](/integrations) — browse every platform Sealmetrics supports.
