WebExpertOvi
STATUS AVAILABLE FOR AUDITS

Md Atiar Rahman Ovi · Junior Manager at Razib Marketing

Analytics & GTM CLIENT: Multi-brand Fashion Retailer YEAR: 2024

Enterprise E-Commerce Server-Side GTM & Meta CAPI Migration

Restoring 28% lost conversion signal and reducing LCP by 640ms via custom edge telemetry.

Server-Side GTM Meta CAPI GA4 Cloudflare Workers Shopify Plus BigQuery Docker
[ 01 // THE CORE PROBLEM ]

Safari ITP cookie suppression and aggressive ad-blockers caused a 30% discrepancy between Shopify backend revenue and Meta Ads reported conversions.

[ 02 // THE CHALLENGE ]

Migrating from 14 client-side vendor tags to server-side GTM without interrupting live Black Friday ad campaigns or creating duplicate event reporting.

[ 03 // VERIFIED OUTCOME ]

Achieved 99.4% conversion match rate with Shopify backend, restored 28% attributed Meta revenue, and reduced page load weight by 410KB.

[ INVESTIGATION & FORENSICS ]

Network payload inspection revealed 34% of checkout events were blocked by client-side browser extensions, while unhashed customer emails triggered Meta CAPI syntax drops.

[ SYSTEM ARCHITECTURE BLUEPRINT ]

Browser -> First-party custom subdomain (data.domain.com) -> Cloudflare Edge -> Server-side GTM Container on Cloud Run -> Dual dispatch to GA4 Measurement Protocol and Meta CAPI with SHA-256 normalized user hashing.

[ ENGINEERING IMPLEMENTATION ]

Engineered custom GTM client templates, configured DNS CNAME delegation with HTTP-only cookie preservation, synchronized event_id generation across client and server streams, and introduced a 48-hour Redis deduplication cache.

[ RIGOROUS VALIDATION PROTOCOL ]

Executed synthetic order runs across Safari 17+, Chrome with uBlock Origin, and mobile in-app browsers. Monitored server access logs for 200 OK responses and compared backend order IDs against GA4 BigQuery raw exports.

Project Context

The client operates an international fashion e-commerce storefront generating over $4M annually across North America and Europe. In early 2024, their performance marketing team observed a sharp drop in reported Meta Ads Return on Ad Spend (ROAS), despite Shopify sales remaining steady.

The Technical Problem

  1. Ad-Blocker Interception: Privacy-focused browsers and desktop ad-blockers were preventing client-side fbq('track', 'Purchase') beacons from ever reaching Meta’s endpoints.
  2. ITP Cookie Truncation: Safari’s Intelligent Tracking Prevention capped _fbp and _fbc cookie lifespans to 24 hours on campaign clicks, severely crippling 7-day click attribution models.
  3. Frontend Bloat: 14 distinct third-party marketing tags running in the client browser severely penalized Core Web Vitals, dragging Largest Contentful Paint (LCP) past 3.8 seconds.

Architecture Blueprint

[User Browser]

      │ 1. Unified Event Payload (HTTPS POST)

[Cloudflare Edge: data.retailer.com]

      │ 2. Edge Routing & Cookie Header Preservation

[Server-Side GTM Container (Cloud Run)]

      ├───────────────────────┬───────────────────────┐
      ▼                       ▼                       ▼
[GA4 Measurement API]   [Meta Conversions API]   [Google Ads Enhanced]
  (200 OK / 38ms)        (Matched: 9.2/10)        (Hashed Match)

Engineering Implementation Details

1. Unified event_id Generation

To prevent double-counting between the legacy browser pixel and the new server-side stream, a deterministic event_id was computed and attached to both streams:

// Data Layer push at order completion
window.dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: order.id,
    event_id: 'order_' + order.id + '_' + order.created_timestamp,
    value: order.total_price,
    currency: 'USD',
    items: order.line_items
  }
});

2. PII Normalization & SHA-256 Hashing

In the server container, customer data was normalized according to Meta’s strict formatting standards (lowercase, trimmed whitespace, E.164 phone formats) before SHA-256 hashing.

Outcome & Validation

  • Event Match Quality Score: Increased from 5.4/10 to 9.2/10 in Meta Events Manager.
  • Conversion Capture: 99.4% parity between Shopify order IDs and server-side conversion payloads.
  • Performance Impact: Page total script payload reduced by 410KB, cutting LCP from 3.8s to 1.9s.
RELATED SERVICE: Analytics & Server-Side Attribution →
[ DIRECT INTAKE ]

Book Technical Consultation

CONSULTATION SCOPE 45-MIN TECHNICAL DIAGNOSIS

A targeted architecture review to diagnose data loss, evaluate GA4/GTM pipelines, inspect WordPress bottlenecks, or scope WCAG compliance.

GA4 / sGTM Audit
Meta CAPI Parity
WP Core Web Vitals
WCAG 2.1 Reflow
Primary Receiver: ovi.cse23@gmail.com

Direct Engineering: Handled personally by Md Atiar Rahman Ovi.

Full Agency Scope: Larger multidisciplinary engagements can be onboarded through our team at Razib Marketing.

ovi@edge-node-dac01:~ (zsh)
WebExpertOvi CLI [v2.4.0-edge]
Connected to Cloudflare Edge (Dhaka / DAC-01) · Latency: 24ms
Welcome to Md Atiar Rahman Ovi's interactive technical terminal.
Type help to view all available system commands.
ovi@edge:~$