All guides
Program guide

GA4 says 200, Tradly says 180. Who's right?

Both are right, they count different things. GA4 counts by client_id (device). Tradly counts by affiliate sessionId (click). This guide finds the 20 missing rows in BigQuery.

1. The three gaps

Gap A: No sessionId (direct traffic, ITP blocked, incognito). Gap B: Session expired (TTL). Gap C: Ad blocker killed pixel but GA4 gtag survived via server-side.

2. Join on transaction_id

Both systems log transaction_id = orderRef. Outer join exposes gap. NULL on Tradly side = GA4 counted, Tradly didn't.

SELECT g.transaction_id, g.client_id, t.session_id, t.partner_id
FROM ga4_events g LEFT JOIN tradly_conversions t USING (transaction_id)
WHERE g.event_name='purchase' AND t.transaction_id IS NULL -- the missing 20

3. Fix Gap A: persist sessionId in note_attributes

At add-to-cart, write sessionId into Shopify note_attributes via Storefront API. Webhook reads it even when pixel blocked.

4. Fix Gap B & C: S2S fallback

Segment or webhook path doesn't need browser. Even if pixel blocked, webhook with same orderRef delivers. Mark source='webhook' for audit.

Implementation checklist

  • Log GA4 client_id + Tradly sessionId as properties on same event
  • Join key is transaction_id = orderRef on every purchase
  • Missing sessionId fallback via note_attributes
  • Dashboard check: purchase events without sessionId trend -> ITP alert

FAQ

Should counts ever match exactly?

No. Expect 5-15% gap. If you force match, you're over-attributing. Payout truth is Tradly, analytics truth is GA4.

Which TTL to use?

30 days default. Shorter TTL widens gap (more direct), longer narrows it but increases stale attribution.

Ad blocker impact?

Pixel gap is 10-25%. Webhook/Segment path closes it. Measure: % purchases with null sessionId per week.

Related guides and tools

  • Duplicate Conversions

    Why purchases double-count and how to fix with Tradly's idempotent orderRef + event_id. Reload, retry, webhook replay - one pattern that ends duplicate commissions.

  • Track ChatGPT Conversions

    ChatGPT sends referrer traffic but most attribution tools miss it. Learn how to capture chatgpt.com referrers, tag your links, and attribute purchases back to AI citations.

  • Free Attribution Platform

    Impact, PartnerStack, and Tune charge $500-2000/month. Tradly Attribution is open source and free to self-host. Here's what you get, what you give up, and when free is the right call.

  • Mobile App Install Attribution

    A practical guide to attributing iOS and Android app installs, signups, and purchases to affiliate partners without losing the original click.

Explore Tradly Attribution, an affiliate attribution platform for partner campaigns, tracking links, conversions, and payouts. See the affiliate attribution features or tracking API. Fix it: Shopify field map · Measure gap: GA4 join SQL · Estimate impact: Calculator.