[{"data":1,"prerenderedAt":123},["ShallowReactive",2],{"work-pixelguard":3},{"id":4,"title":5,"body":6,"category":84,"challenge":85,"codeSnippet":86,"description":90,"extension":91,"featured":92,"finalScreenshot":93,"gridOrder":94,"isDemo":92,"isDemoURL":80,"liveUrl":95,"meta":96,"mockupImage":97,"navigation":98,"nextProject":95,"order":99,"path":100,"results":95,"schneiderFeatured":92,"schneiderOrder":95,"seo":101,"solution":102,"stem":103,"subtitle":104,"tags":105,"techStack":112,"thumbnail":120,"thumbnailVideo":95,"year":121,"__hash__":122},"works/works/pixelguard.md","Pixel Guard",{"type":7,"value":8,"toc":79},"minimark",[9,14,18,21,26,37,43,53,70,76],[10,11,13],"h1",{"id":12},"pixelguard-server-side-tracking-for-shopify","PixelGuard — Server-Side Tracking for Shopify",[15,16,17],"p",{},"Replaces $200-500/month SaaS tools (Elevar, Analyzify, Littledata) with a self-hosted, open-source 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, and a Remix + Polaris admin app that diagnoses tracking loss.",[19,20],"hr",{},[22,23,25],"h2",{"id":24},"key-technical-decisions","Key Technical Decisions",[15,27,28,36],{},[29,30,31,32],"strong",{},"Event deduplication via shared ",[33,34,35],"code",{},"event_id"," — Both client pixel and server webhook use the same UUID per purchase. Ad platforms auto-deduplicate without manual coordination.",[15,38,39,42],{},[29,40,41],{},"GDPR-safe consent defaults"," — All tracking permissions default to denied. Only explicit consent grants access. Every state change logged with timestamp and region for audit compliance. Maps to Google Consent Mode v2's four signals.",[15,44,45,48,49,52],{},[29,46,47],{},"Resilient multi-platform dispatch"," — ",[33,50,51],{},"Promise.allSettled"," ensures one platform's API failure doesn't block the others. Events logged to D1 regardless of platform response.",[15,54,55,58,59,62,63,62,66,69],{},[29,56,57],{},"Session bridging"," — Client-side attribution cookies (",[33,60,61],{},"_fbp",", ",[33,64,65],{},"_fbc",[33,67,68],{},"gclid",") captured by the pixel and stored in D1 keyed by hashed email. Server-side webhooks (which have email but no cookies) pull the missing attribution data for CAPI enrichment.",[15,71,72,75],{},[29,73,74],{},"Validation engine"," — The dashboard doesn't just track — it diagnoses. Compares client vs server event counts to calculate per-platform capture rates and classify every missed event by root cause: ad blocker, iOS ITP, consent denied, or redirect.",[15,77,78],{},"Saves merchants $2,400-6,000/year in SaaS fees while providing better diagnostic visibility than the paid alternatives.",{"title":80,"searchDepth":81,"depth":81,"links":82},"",2,[83],{"id":24,"depth":81,"text":25},"Analytics & Tracking","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.",{"language":87,"filename":88,"code":89},"typescript","worker/dispatch.ts","async function dispatchServerEvents(\n  event: NormalizedEvent,\n  platforms: PlatformConfig[]\n) {\n  const results = await Promise.allSettled(\n    platforms.map(async (platform) => {\n      const payload = platform.transform(event)\n      const response = await fetch(platform.endpoint, {\n        method: 'POST',\n        headers: platform.headers,\n        body: JSON.stringify(payload),\n      })\n      return { platform: platform.name, status: response.status }\n    })\n  )\n\n  await env.DB.prepare(\n    'INSERT INTO dispatch_log VALUES (?, ?, ?, ?)'\n  ).bind(event.id, event.type, JSON.stringify(results), Date.now()).run()\n}\n","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.","md",false,"/images/projects/pixelguard-final.jpg",5,null,{},"/images/projects/pixelguard-mockup.jpg",true,12,"/works/pixelguard",{"title":5,"description":90},"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.","works/pixelguard","Server-Side Tracking",[106,107,108,109,110,111],"Shopify Web Pixel","CAPI","Cloudflare Workers","Meta Ads","GA4","Privacy",[113,114,115,108,116,117,118,119],"TypeScript","Remix","Polaris","Hono","D1","Shopify Web Pixel Extension","Prisma","/images/projects/pixelguard.jpg","2026","oGxmZl4y6hjCmSrjfg3HnBxskpGUpJNG6kHf7luZ69E",1773700381217]