Back to Work
Analytics & Tracking2026

Pixel Guard

Shopify Web PixelCAPICloudflare WorkersMeta AdsGA4Privacy

Open-source server-side tracking that replaces $200-500/month SaaS tools. Captures purchase events via Shopify Web Pixel and webhooks, fires server-side CAPI to Meta, GA4, Google Ads, and TikTok, and diagnoses exactly why tracking was lost.

The Challenge

E-commerce stores lose 30-50% of purchase tracking data to ad blockers, iOS ITP, consent denials, and external payment redirects. Ad platform bidding algorithms trained on incomplete data make profitable campaigns look unprofitable. Existing SaaS solutions cost $200-500/month and offer limited diagnostic visibility.

The Solution

Three components: a Shopify Web Pixel Extension capturing client-side events with SHA-256 hashed PII, a Cloudflare Workers edge server firing server-side CAPI to four ad platforms simultaneously from a first-party subdomain, and a Remix + Polaris admin app that diagnoses tracking loss by root cause — ad blocker, iOS ITP, consent denied, or redirect.

Design
Code
Result
worker/dispatch.tstypescript
  1async function dispatchServerEvents(  2  event: NormalizedEvent,  3  platforms: PlatformConfig[]  4) {  5  const results = await Promise.allSettled(  6    platforms.map(async (platform) => {  7      const payload = platform.transform(event)  8      const response = await fetch(platform.endpoint, {  9        method: 'POST', 10        headers: platform.headers, 11        body: JSON.stringify(payload), 12      }) 13      return { platform: platform.name, status: response.status } 14    }) 15  ) 16 17  await env.DB.prepare( 18    'INSERT INTO dispatch_log VALUES (?, ?, ?, ?)' 19  ).bind(event.id, event.type, JSON.stringify(results), Date.now()).run() 20} 21
Scroll to explore
Tech Stack
TypeScriptRemixPolarisCloudflare WorkersHonoD1Shopify Web Pixel ExtensionPrisma

Interested in similar work?

Let's discuss how I can help bring your Shopify project to life.