← Back to Docs

Troubleshooting Guide

Resolve common pageview, conversion, and stitching issues.

Who This Is For

This guide is for developers, founders, and marketers looking to diagnose issues with missing pageviews, unstitched conversions, or webhook errors.

Key Terms Defined:

  • Developer Tools — the inspect panel inside modern browsers used to view console logs and inspect network payloads.
  • Console — the command-line interface inside Developer Tools where errors are logged and manual code can be run.
  • Event Debugger — the real-time event log inside the SourceTrack dashboard showing raw events as they hit our servers.

What You Will Diagnose

You will inspect your browser network logs, review dashboard event updates, verify API responses, and run quick browser tests to solve tracking discrepancies.

Symptoms and Solutions

Symptom:No pageviews are showing up in the dashboard

Likely Cause: The site key is incorrect, the script is not loading, or a browser/network extension may be suppressing the endpoint.

Fix: Verify that the script tag exists in your HTML source and contains the exact Site Key from settings. Check the browser Console and Network tabs for blocks. We recommend running the Browser Connection Check inside the Setup Doctor.

How to Verify: Look for the "track" network request returning a 200 success response.

Symptom:Missing conversion events

Likely Cause: The conversion script was fired before the window.sourcetrack object finished loading, or the script tag did not fire on the thank-you/success page.

Fix: Wrap your conversion script in a load event listener or check that it executes after the main script loads. Ensure the tracking script is installed on the checkout confirmation page.

How to Verify: Paste a manual conversion call into the browser Console on your checkout page and verify it appears in the Event Debugger.

Symptom:Duplicate conversion counts

Likely Cause: The conversion script is fired multiple times (e.g., when the user refreshes the thank-you page).

Fix: Pass a unique, stable order_id parameter (such as the order number or payment intent ID) in your conversion options body. SourceTrack automatically skips duplicate payloads carrying the same order_id from a given integration. If more than one order-reporting integration is active for the same store, a duplicate can persist for up to 24 hours until the nightly reconciliation job resolves it — use a single order-reporting integration per store to avoid this.

How to Verify: Trigger the event twice in your console. The first should return success, and the second should be logged as deduplicated.

Symptom:Conversions counted twice in Meta or TikTok ads reporting

Likely Cause: Your browser pixel and the CAPI forwarding in SourceTrack each report the same conversion to the ad platform. Meta and TikTok reliably merge the two into one only when both carry the same event ID, and that does not happen by default.

Fix: Generate one stable ID per conversion and send it in both places: as the eventID on your pixel call, and as the event_id field in your window.sourcetrack.conversion() options body. Any stable string works so long as it is byte-identical on both sides — the order number is a common choice. If you do not supply event_id, SourceTrack falls back to an internal identifier that a standard pixel install will not reproduce, so the two reports stay separate and the conversion is counted twice. This applies to Meta and TikTok, which share the same event-ID model. Google Ads and GA4 deduplicate on a different mechanism and are not covered by it.

How to Verify: Send one test conversion, then open that event in Meta Events Manager or TikTok Events Manager. A correctly shared ID shows the browser and server events merged into a single deduplicated event rather than two separate ones.

Symptom:Shopify orders counted twice in Meta ads reporting

Likely Cause: The built-in Facebook & Instagram sales channel in Shopify reports purchases to Meta over its own connection. Those events never reach SourceTrack, so no deduplication performed by SourceTrack can apply to them.

Fix: Report each order to Meta from one place only. Either turn off customer data sharing in the Shopify sales channel and let SourceTrack forward the order, or keep the sales channel as your reporting source and leave Meta forwarding switched off for that store. Sharing an event_id does not help here: the sales channel has no knowledge of the ID SourceTrack uses, and the two connections operate independently.

How to Verify: Compare purchase counts in Meta Events Manager against the actual order count in your Shopify admin for the same date range. Roughly double the orders means two connections are reporting, and the source breakdown in Events Manager will name both.

Symptom:Traffic shows as "Direct/None" instead of organic/referral

Likely Cause: Not the cause: the site that linked to you needing our script. Referral detection reads document.referrer, which the visitor's own browser sets as it follows the link, so the referring site sends us nothing and needs nothing installed. What actually empties it is the hop: a strict Referrer-Policy on the referring site (no-referrer or same-origin, which many large sites and most email providers set deliberately), an HTTPS page linking to an HTTP one (browsers drop the referrer on that downgrade), or a link opened from a native app, chat client or PDF viewer that never sets one. Private windows and untagged ad clicks land the same way.

Fix: Fix the half you control: serve your own site over HTTPS so inbound HTTPS links keep their referrer, and put UTM parameters on every campaign, email and partner link you own — a UTM survives all of the above because it travels in the URL rather than in a header. The other half is not fixable, and should not be treated as a bug: when a referring site sets no-referrer or a visitor arrives from an app that strips it, that visit is genuinely indistinguishable from someone typing your address in. It belongs in Direct, and no analytics tool can recover it without inventing a source.

How to Verify: On the landing page of a fresh visit, read document.referrer in the console — empty means the browser sent nothing, so the gap is upstream of us, not a tracking failure. To tell "legitimately Direct" from "broken", watch the shape rather than the level: a steady share of Direct is normal, while a source that collapses to Direct suddenly, or Direct jumping right after a site or link change, points at a real regression worth chasing.

Symptom:Shopify order revenue does not stitch to journeys

Likely Cause: The st_aid attribute was not successfully saved on the Shopify cart object, or the Shopify webhook HMAC check failed.

Fix: Ensure your theme files update the cart attributes successfully before the customer reaches checkout. Check that your Shopify webhook url is configured with the correct site key.

How to Verify: Add items to your cart, fetch the cart JSON (yoursite.com/cart.json), and verify that "st_aid" exists inside the attributes object.

Symptom:Stripe webhook payments do not stitch to journeys

Likely Cause: The st_aid metadata parameter was not forwarded in the Checkout Session or Customer object creation call.

Fix: Verify your backend API code is extracting "st_aid" from requests and passing it in the metadata configurations of the Stripe object creation.

How to Verify: Inspect the Checkout Session object in your Stripe Dashboard logs to verify that the metadata contains the correct st_aid value.

How to Verify Success

  1. Make your target changes (updating theme files, clearing caching systems, or adjusting metadata configurations).
  2. Clear your browser data or load the site inside an incognito/private tab to bypass local caches.
  3. Open your browser Developer Tools (Network Tab) and filter for track.
  4. Perform the action (loading a page, clicking a button) and verify the request exits successfully.

Common Troubleshooting Mistakes

  • Testing behind active proxy profiles: VPNs or corporate firewalls can occasionally filter incoming analytic endpoints. Test on standard connections or home networks.
  • Ignoring CSS/Theme caches: Caching systems (like WordPress plugins, Shopify edge networks, or Cloudflare proxies) may hold onto outdated tracking scripts. Always clear caches after making script changes.

Cookieless Mode: Attribution Trade-offs

Cookieless mode is more privacy-friendly but less persistent than the standard tracker. Visitor IDs are derived server-side via a daily-rotating salted hash and are not stored in the browser at all.

  • Visitor ID request can be blocked. The cookieless tracker fetches its visitor id from /api/tracker/id on every page load. If an ad-blocker, corporate proxy, or transient network failure blocks that request, the tracker falls back to a session-only random id and writes a one-line warning to the browser DevTools console: [SourceTrack] Cookieless visitor ID … using a session-only fallback id.
  • Same-session only when the fallback fires. A visitor whose id resets cannot be connected across sessions. Their later conversion may be recorded as direct because no prior pageview is linked to the new id. Attribution may become same-session only or weaker depending on browser and network behavior.
  • First-touch is in-memory only. The cookieless tracker holds the first-touch source for the active page session only. It is not preserved across page reloads.

If you need full multi-session attribution, switch off cookieless mode inSettingsand use the standard tracker, which stores a stable id in localStorage.

Using Setup Doctor for Diagnostics

The Setup Doctor on your Snippet Code settings page helps identify connection and configuration issues.

  • Browser Connection Check: If analytics requests are not sending, open the Browser Connection Check disclosure. It tests if your browser can reach the backend liveness ping. If it fails, a browser extension, VPN, or network firewall may be blocking the SourceTrack API.
  • Live Pageview Verification: For production sites, use the "Verify a live pageview" test link generation. This adds a temporaryst_verify token to the URL and checks whether SourceTrack receives a live pageview from your production domain. Note: Test links are blocked for unsafe/local test domains.
  • Wrong Domain / Test Traffic: If you receive warnings in the diagnostics panel, verify that the active domain matches your registered production domain. Setup Doctor does not treat localhost/staging traffic as onboarding success.

Scope of Verification: Remember that a healthy Setup Doctor status helps confirm that events are being received from your site, but it does not prove that every page has the script installed. Setup Doctor does not validate attribution accuracy.

Next Step

Troubleshooting resolved? Return to theUser Docs hubto configure additional platform integrations.