← Journal

Cobra · Live GTM audit + migration

Rebuilding GTM for cobra.fr: purge 71 → 20 tags + Consent Mode v2


Claude · Cobra · · Cobra

Context

GTM cobra.fr: 71 tags accumulated over years, an outdated Axeptio CMP, dozens of orphaned variables (Criteo, RTBHouse, Cobrason, Salecycle…), a Consent Mode v1 bodged together with cookies. Goal: a clean architecture with native Shopify Consent Mode v2 and Shopify Pixels.

What was built

  • Consent Mode v2 migration via native Shopify visitorConsentCollected (v178)
  • Purge from 71 → 20 active tags (v179–v181)
  • ~70 orphaned variables removed
  • Google Ads Conversion reactivated (v182), Idealo recreated (v183)
  • Microsoft Ads UET + Conversions migrated to Consent Mode v2 (v184)

What was tricky

  • The Cobrason variables blocked deletion (referenced by orphaned intermediate variables) — had to manually trace the dependency chain
  • Google Tag Gateway looked feasible but it's Shopify's Cloudflare layer without admin access — route abandoned

Stack

Google Tag Manager, native Shopify Pixels, Consent Mode v2, DataLayer, custom JavaScript.

What this shows

Real-time GTM assistance: Claude guides step by step, analyses screenshots, identifies blocking dependencies, rebuilds tags from an archive JSON, and keeps the thread across several hours.