3 min read
Shopify TYOS Migrator

An automation tool that migrates Shopify tracking pixels from legacy Thank-You and Order-Status page scripts to the modern Customer Events API. Supports 8 major advertising platforms with 100% automation and pixel parity validation.

Problem

Shopify is sunsetting legacy tracking scripts on Thank-You and Order-Status pages, with hard deadlines for merchants (August 2025 for Plus plans, August 2026 for non-Plus). Every merchant running tracking pixels — Google Ads, Meta, TikTok, and others — needs to migrate to the Customer Events API or lose conversion tracking entirely. Agencies currently charge $1,300–$2,500 per migration.

Approach

The migrator scans a store’s legacy tracking code, identifies which vendors are present, and generates the equivalent Customer Events API implementation for each one. A vendor adapter pattern handles the differences between platforms — each of the 8 supported vendors has its own adapter that maps legacy pixel behavior to the new API surface. Playwright end-to-end tests validate pixel parity between the legacy implementation and the migrated output.

The tool handles Consent Mode v2 compliance and server-side event deduplication, which are the two areas where manual migrations most commonly break.

Supported Platforms

Google Ads, GA4, Meta, TikTok, Pinterest, Snap, Klaviyo, and Bing UET — covering the vast majority of e-commerce tracking setups.

What’s Implemented

  • Automated scanning of legacy tracking scripts with vendor identification
  • Vendor adapter pattern — 8 platform-specific adapters mapping legacy pixels to Customer Events API
  • Pixel parity validation — Playwright E2E tests confirming migrated code produces identical tracking behavior
  • Consent Mode v2 compliance with server-side event deduplication
  • Shopify OAuth 2.0 integration for store access
  • Production infrastructure — Docker containers on Fly.io, Redis-backed sessions, SQLite with Litestream backups, Prometheus metrics, Pino structured logging

Architecture

Built as a pnpm monorepo with separated concerns: a core migration engine, vendor-specific adapters, an OAuth flow for Shopify store access, and a validation layer powered by Playwright. The deployment runs on Fly.io with Docker, using Redis for session management and SQLite (with Litestream continuous backups) for persistence.

What This Demonstrates

Multi-platform integration engineering across 8 distinct ad network APIs, Shopify OAuth and API integration, automated testing strategies for migration correctness (pixel parity validation), and production deployment with observability (Prometheus, structured logging, error tracking).