Twine

Same-Origin First-Party Tracking (Stape /stp Proxy) & Meta CAPI for E-Commerce

Djordje Pajovic
Published

0
  • Project creator

Client: direct-to-consumer e-commerce brand

Challenge: Safari ITP and ad blockers were dropping 25-35% of purchase events, hurting Meta ROAS and causing large GA4 vs Shopify discrepancies.

What I did

  • Standardized e-commerce dataLayer events (view_item, add_to_cart, begin_checkout, purchase)
  • Deployed server-side GTM on Stape with a same-origin reverse proxy (/stp) and custom domain so tracking runs strictly first-party
  • Wired Meta Pixel + Conversions API with event_id deduplication and SHA-256 hashed customer data, alongside clean GA4 purchase tracking
  • Verified with end-to-end test checkouts in GTM Preview, GA4 DebugView and Meta Events Manager

Result: ITP and ad-blocker signal loss bypassed, duplicate purchases eliminated and Meta Event Match Quality improved.

Stack: server-side GTM, Stape, Cloudflare / Vercel, Meta CAPI, GA4, Shopify

More work: [djordjepajovic.com](https://www.twine.net/signin