← Back to Insights

Shopify Tracking Debugging Guide

Shopify tracking bugs cluster in five places, theme, app conflicts, the checkout sandbox, webhooks, and consent apps. A 10-minute triage flow and a fix for each one, in the order that actually finds the problem fastest.

2026-08-07 • Shopify

When conversion tracking fails on a Shopify store, merchants often face an interconnected chain of tracking bottlenecks instead of a single isolated bug.

The checkout sandbox may block client-side scripts, order creation webhooks can fail or time out, unformatted monetary values cause payload rejections, or broken deduplication logic logs every transaction twice.

Diagnosing Shopify tracking requires a structured sequence: checking browser network calls, inspecting sandboxed Customer Events, evaluating webhook execution logs, and verifying CAPI status codes.

Here is a systematic debugging sequence to locate and resolve Shopify tracking failures.

1. Funnel triage: isolating where telemetry stops

Before modifying code, complete a test purchase while recording network activity to identify the exact step where event delivery breaks:

Open browser developer tools, switch to the Network tab, and filter requests by bzr.openai.com. Walk through each funnel step:

  1. Catalog browsing: Load a product page and confirm contents_viewed executes. Add the product to cart and confirm items_added dispatches.
  2. Checkout initiation: Proceed to checkout and check for checkout_started. Because checkout executes within Shopify's sandboxed worker, inspect Shopify Customer Events logs if network panel filtering appears blank.
  3. Order confirmation: Finalize the transaction. Confirm that order_created registers in OpenAI Ads Manager's real-time event log within a few minutes. Server-side CAPI events transmit from background webhooks and will not appear in browser network tabs.

Isolating whether data loss occurs during storefront browsing, sandboxed checkout, or backend webhook execution determines your remediation path.

2. Storefront theme script validation

If top-of-funnel events (page_viewed, contents_viewed, items_added) fail to execute, inspect your theme code:

The base pixel loader belongs in <head> inside layout/theme.liquid:

<head>
  
  <script async src="https://bzrcdn.openai.com/sdk/oaiq.min.js"></script>
  <script>
    window.oaiq = window.oaiq || function () {
      (window.oaiq.q = window.oaiq.q || []).push(arguments);
    };
    oaiq("init", { pixelId: "YOUR-PIXEL-ID" });
  </script>
</head>

If this snippet is missing, loaded late in the document body, or nested inside a failing Liquid conditional, subsequent oaiq calls fail silently.

Automated theme updates frequently overwrite theme.liquid with fresh vendor templates, stripping out custom tracking scripts. Review recent theme revision histories in Shopify Admin under Online Store > Themes.

Migrating between themes or testing multiple analytics apps can leave duplicate initialization scripts in your layout, triggering duplicate page-view calls. Inspect page source code to ensure oaiq("init", ...) runs exactly once per page.

3. Sandboxed checkout pixel configuration

If catalog events fire normally but checkout_started and intermediate funnel actions never record, the failure stems from Shopify's checkout isolation.

Shopify restricts third-party script injection on checkout pages. Code placed in theme.liquid does not execute during checkout.

Checkout tracking requires creating a Custom Pixel in Shopify Admin under Settings > Customer Events:

Verify that the custom pixel is actively enabled. Saved scripts do not run until explicitly activated in the admin console.

Ensure the custom pixel initializes oaiq with your Pixel ID within its sandboxed worker, as it operates in an isolated execution context separate from your theme layout.

Review our Shopify tracking guide for complete Customer Events implementation templates.

4. Webhook delivery and server-side CAPI health

If checkout events display in Ads Manager but completed sales never appear as order_created, the failure point exists within your backend webhook integration.

Because browser pixels are subject to ad blockers, early tab closures, and gateway redirects, verified purchase events should dispatch server-to-server from an orders/create webhook.

Audit your webhook pipeline across these checkpoints:

Verify in Shopify Admin under Settings > Notifications > Webhooks (or your app management portal) that an active subscription exists for orders/create.

Ensure your server endpoint returns an HTTP 200 response immediately upon receipt before executing asynchronous CAPI dispatches. Shopify disables webhooks that time out or fail consecutively.

Verify that transaction values format as integers in minor currency units (such as 8998 for $89.98 USD). Sending decimal floating-point numbers causes CAPI endpoints to reject the payload with an HTTP 400 error.

Confirm that your webhook handler retrieves the stored __oppref click token and includes it in the outbound CAPI payload.

Consent management platforms (CMPs) can delay tracking execution until a customer grants explicit consent.

Test your site in an incognito window:

Inspect network requests to bzr.openai.com prior to interacting with the banner.

Click accept and verify whether tracking scripts initialize immediately or require an additional page reload.

If consent acceptance requires a reload, same-session conversions from first-time visitors are lost. Update your CMP configuration to initialize scripts immediately upon consent grant.

Verifying the resolution

After resolving the identified failure point, validate your implementation across the complete funnel:

  1. Complete a test transaction using an identifiable order reference.
  2. Confirm that product views, cart additions, and checkout steps emit matching payloads in browser network logs.
  3. Check backend webhook logs to verify that the orders/create listener dispatches an HTTP POST to https://bzr.openai.com/v1/events returning HTTP 200 or 202.
  4. Confirm that the transaction appears as a single deduplicated conversion inside OpenAI Ads Manager within several minutes.

While walking through your storefront theme and checkout steps, keep OpenAI Ads Pixel Helper open in Chrome to separate script load failures from checkout network blocks in seconds.

To isolate storefront firing from server webhooks inside your Shopify admin in seconds, test with our free Y OpenAI Ads Pixel ChatGPT Ads app featuring 5-second live diagnostics and dry-run validate_only checks.

Our tracking audit service diagnoses Shopify tracking pipelines and provides a verified remediation plan within 48 hours.

Need ChatGPT tracking installed?

Configured, tested, documented.