Back to Portfolio
Growth Engineering Case Study · WebyZoo — My Agency

WebyZoo MarTech Engine: Hybrid Server-Side CAPI & Conversion Attribution

How I recovered 35% of dark conversion signals and boosted Meta EMQ to 9.4/10 with an enterprise client/server tracking infrastructure.

9.4/10
Meta EMQ
+35%
Recovered conversions
0%
Double-attribution error
400-day
Safari cookie retention
-22%
Blended CAC

Executive Overview & Problem Statement

Following iOS 14.5 App Tracking Transparency (ATT) and Safari Intelligent Tracking Prevention (ITP), client-side pixel accuracy degraded severely across e-commerce stores. Third-party ad blockers, cookie decay, and cross-site tracking restrictions caused up to 40% of conversion signals to go completely dark. Additionally, standard Cash on Delivery (COD) models suffered heavily from fake orders polluting advertising bidding algorithms with premature purchase signals.

Engineered an enterprise-grade hybrid conversion tracking system combining client-side DataLayer events with server-side Meta Conversions API (CAPI), GA4 Measurement Protocol, and TikTok Events API. Solved iOS 14.5+ attribution loss, eliminated double-counting via 17-digit deterministic deduplication, and protected $40k+ in monthly ad spend through a novel Cash on Delivery two-phase verification pipeline.

Core Architectural Features

01. Zero-Drop Dual Dispatch

Simultaneous client pixel and server-side execution guaranteeing that client-side network interruptions never drop conversion payloads.

02. Deterministic Deduplication

17-digit synchronized event IDs shared across client events and server dispatch queues, completely eliminating double-attribution in Meta and GA4.

03. Safari ITP Resilience

Server-set HttpOnly first-party cookies that bypass Safari's 7-day Intelligent Tracking Prevention limits, securing up to 400-day attribution windows.

04. Ad-Blocker Stealth Proxy

First-party reverse proxy routing through the main domain, preventing ad-blockers and privacy shields from stripping tracking endpoints.

05. COD Ad Spend Firewall

Withholds purchase signals on Cash on Delivery orders until courier confirmation, stopping wasted algorithmic ad spend on phantom or cancelled orders.

06. Regulatory Compliance

Full compatibility with Google Consent Mode v2, Digital Markets Act (DMA), and GDPR, dynamically adjusting collection based on user consent.

End-to-End Event Lifecycle Flow
Target SLA: <45ms Latency
Stage 1
DataLayer Instrumentation

Generates deterministic 17-digit event IDs on client interaction and dispatches to client pixels.

Stage 2
Reverse Proxy Ingestion

First-party edge endpoint proxies data, sets HttpOnly cookies, and completely bypasses ad-blockers.

Stage 3
Verification & COD Gate

Deduplicates IDs against database cache and verifies order legitimacy before releasing ad network calls.

Stage 4
Multi-CAPI Server Dispatch

Asynchronously transmits payloads to Meta Graph API v19, GA4, and TikTok with 9.4/10 EMQ.

Infrastructure & Technologies Used

Next.jsTypeScriptMeta Graph API v19GA4 Measurement ProtocolTikTok Events APILinkedIn CAPIPrisma ORMSQLite / PostgreSQLDockerNginx Reverse Proxy
Confidential client repository · Code available on requestRequest Technical Walkthrough