[{"data":1,"prerenderedAt":1609},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fen\u002Fdata\u002Fserver-side-gtm-conversion-api-production-deployment":13},{"i18nKey":4,"paths":5},"data-001-2026-07",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Fdata\u002Fserver-side-gtm-conversion-api-production","\u002Fen\u002Fdata\u002Fserver-side-gtm-conversion-api-production-deployment","\u002Fes\u002Fdata\u002Fsgtm-conversion-api-produccion","\u002Ffr\u002Fdata\u002Fserveur-gtm-et-api-conversion-de-zero-a-production","\u002Fit\u002Fdata\u002Fserver-side-gtm-conversion-api-production","\u002Fru\u002Fdata\u002Fsgtm-conversion-api-production","\u002Ftr\u002Fdata\u002Fserver-side-gtm-ve-conversion-api-sifirdan-productiona",{"_path":7,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1603,"_id":1604,"_source":1605,"_file":1606,"_stem":1607,"_extension":1608},"data",false,"","Server-Side GTM and Conversion API: Zero to Production","Technical guide to deploying server-side GTM containers on Cloud Run or Workers, establishing Conversion API deduplication, and designing production-ready monitoring.","2026-07-14",[21,22,23,24,25],"server-side-gtm","conversion-api","cloud-run","deduplication","privacy-sandbox",8,"Roibase",{"type":29,"children":30,"toc":1589},"root",[31,39,46,51,78,83,90,104,278,291,320,326,331,359,568,581,601,607,627,797,829,835,840,852,1223,1235,1241,1246,1333,1338,1343,1349,1362,1430,1464,1470,1475,1480,1486,1491,1573,1578,1583],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","Cookie-based measurement is no longer optional—with Safari, Firefox, and Chrome disabling third-party cookies entirely by 2025, first-party data architecture is now mandatory. Server-side event transmission via Google Analytics 4 and Meta Conversion API forms the foundation of this new era. Yet there is a vast gap between \"we deployed server-side GTM\" and \"it runs reliably in production\": container deployment, event deduplication, load balancing, error handling, and cost optimization are non-negotiable. This guide walks you through building a production-grade server-side GTM setup from scratch on Cloud Run or Cloudflare Workers.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"server-side-gtm-anatomy-container-tagging-server-and-client",[44],{"type":37,"value":45},"Server-Side GTM Anatomy: Container, Tagging Server, and Client",{"type":32,"tag":33,"props":47,"children":48},{},[49],{"type":37,"value":50},"Server-side Google Tag Manager differs architecturally from classic web GTM. A lightweight JavaScript snippet on the client side performs a simple \"data layer push,\" but the heavy lifting—sending requests to third-party APIs, reading cookies, enrichment—falls to a backend container. This container runs as a Docker image on Google Cloud Run, AWS Fargate, or Cloudflare Workers.",{"type":32,"tag":33,"props":52,"children":53},{},[54,56,62,64,69,71,76],{"type":37,"value":55},"The architecture spans three layers. The first layer is the ",{"type":32,"tag":57,"props":58,"children":59},"strong",{},[60],{"type":37,"value":61},"web browser",{"type":37,"value":63},": gtag.js or gtm.js sends a minimal event payload (client_id, event_name, timestamp) via HTTP POST to your server. The second layer is the ",{"type":32,"tag":57,"props":65,"children":66},{},[67],{"type":37,"value":68},"tagging server",{"type":37,"value":70},": a Node.js-based GTM container running in a Cloud Run pod receives this POST, triggers tags in your GTM workspace (GA4, Meta CAPI, TikTok Events API), and forwards each as parallel HTTP requests to platform APIs. The third layer is the ",{"type":32,"tag":57,"props":72,"children":73},{},[74],{"type":37,"value":75},"destination platforms",{"type":37,"value":77},": Google Analytics Measurement Protocol, Meta Graph API, and so on. Server-side GTM acts as a proxy between these layers while also handling enrichment, filtering, and deduplication logic.",{"type":32,"tag":33,"props":79,"children":80},{},[81],{"type":37,"value":82},"In classic GTM, every tag loads a separate JavaScript snippet on the web page; 10 tags equals 10 external requests and page slowdown. In server-side GTM, the browser sends one request to your infrastructure, and the remaining 10 requests run in parallel on the backend. User experience improves, ad blockers are bypassed, and first-party cookie lifespan extends (SameSite=None issues vanish). Yet this setup introduces new costs: per-hit Cloud Run invocations, geolocation services, log storage. Managing this tradeoff correctly determines production success.",{"type":32,"tag":84,"props":85,"children":87},"h3",{"id":86},"cloud-run-deploy-dockerfile-and-config",[88],{"type":37,"value":89},"Cloud Run Deploy: Dockerfile and Config",{"type":32,"tag":33,"props":91,"children":92},{},[93,95,102],{"type":37,"value":94},"You can deploy using Google's official ",{"type":32,"tag":96,"props":97,"children":99},"code",{"className":98},[],[100],{"type":37,"value":101},"gcr.io\u002Fcloud-tagging-10302018\u002Fgtm-cloud-image",{"type":37,"value":103}," image or create your own Dockerfile with custom middleware (IP blacklisting, rate limiting). Here is a minimal Cloud Run deployment:",{"type":32,"tag":105,"props":106,"children":110},"pre",{"className":107,"code":108,"language":109,"meta":16,"style":16},"language-bash shiki shiki-themes github-dark","gcloud run deploy gtm-server \\\n  --image=gcr.io\u002Fcloud-tagging-10302018\u002Fgtm-cloud-image:stable \\\n  --platform=managed \\\n  --region=europe-west1 \\\n  --allow-unauthenticated \\\n  --set-env-vars=\"CONTAINER_CONFIG=\u003Cbase64_config>\" \\\n  --min-instances=1 \\\n  --max-instances=10 \\\n  --cpu=1 \\\n  --memory=512Mi \\\n  --concurrency=80\n","bash",[111],{"type":32,"tag":96,"props":112,"children":113},{"__ignoreMap":16},[114,148,161,174,187,200,218,231,243,256,269],{"type":32,"tag":115,"props":116,"children":119},"span",{"class":117,"line":118},"line",1,[120,126,132,137,142],{"type":32,"tag":115,"props":121,"children":123},{"style":122},"--shiki-default:#B392F0",[124],{"type":37,"value":125},"gcloud",{"type":32,"tag":115,"props":127,"children":129},{"style":128},"--shiki-default:#9ECBFF",[130],{"type":37,"value":131}," run",{"type":32,"tag":115,"props":133,"children":134},{"style":128},[135],{"type":37,"value":136}," deploy",{"type":32,"tag":115,"props":138,"children":139},{"style":128},[140],{"type":37,"value":141}," gtm-server",{"type":32,"tag":115,"props":143,"children":145},{"style":144},"--shiki-default:#79B8FF",[146],{"type":37,"value":147}," \\\n",{"type":32,"tag":115,"props":149,"children":151},{"class":117,"line":150},2,[152,157],{"type":32,"tag":115,"props":153,"children":154},{"style":144},[155],{"type":37,"value":156},"  --image=gcr.io\u002Fcloud-tagging-10302018\u002Fgtm-cloud-image:stable",{"type":32,"tag":115,"props":158,"children":159},{"style":144},[160],{"type":37,"value":147},{"type":32,"tag":115,"props":162,"children":164},{"class":117,"line":163},3,[165,170],{"type":32,"tag":115,"props":166,"children":167},{"style":144},[168],{"type":37,"value":169},"  --platform=managed",{"type":32,"tag":115,"props":171,"children":172},{"style":144},[173],{"type":37,"value":147},{"type":32,"tag":115,"props":175,"children":177},{"class":117,"line":176},4,[178,183],{"type":32,"tag":115,"props":179,"children":180},{"style":144},[181],{"type":37,"value":182},"  --region=europe-west1",{"type":32,"tag":115,"props":184,"children":185},{"style":144},[186],{"type":37,"value":147},{"type":32,"tag":115,"props":188,"children":190},{"class":117,"line":189},5,[191,196],{"type":32,"tag":115,"props":192,"children":193},{"style":144},[194],{"type":37,"value":195},"  --allow-unauthenticated",{"type":32,"tag":115,"props":197,"children":198},{"style":144},[199],{"type":37,"value":147},{"type":32,"tag":115,"props":201,"children":203},{"class":117,"line":202},6,[204,209,214],{"type":32,"tag":115,"props":205,"children":206},{"style":144},[207],{"type":37,"value":208},"  --set-env-vars=",{"type":32,"tag":115,"props":210,"children":211},{"style":128},[212],{"type":37,"value":213},"\"CONTAINER_CONFIG=\u003Cbase64_config>\"",{"type":32,"tag":115,"props":215,"children":216},{"style":144},[217],{"type":37,"value":147},{"type":32,"tag":115,"props":219,"children":221},{"class":117,"line":220},7,[222,227],{"type":32,"tag":115,"props":223,"children":224},{"style":144},[225],{"type":37,"value":226},"  --min-instances=1",{"type":32,"tag":115,"props":228,"children":229},{"style":144},[230],{"type":37,"value":147},{"type":32,"tag":115,"props":232,"children":233},{"class":117,"line":26},[234,239],{"type":32,"tag":115,"props":235,"children":236},{"style":144},[237],{"type":37,"value":238},"  --max-instances=10",{"type":32,"tag":115,"props":240,"children":241},{"style":144},[242],{"type":37,"value":147},{"type":32,"tag":115,"props":244,"children":246},{"class":117,"line":245},9,[247,252],{"type":32,"tag":115,"props":248,"children":249},{"style":144},[250],{"type":37,"value":251},"  --cpu=1",{"type":32,"tag":115,"props":253,"children":254},{"style":144},[255],{"type":37,"value":147},{"type":32,"tag":115,"props":257,"children":259},{"class":117,"line":258},10,[260,265],{"type":32,"tag":115,"props":261,"children":262},{"style":144},[263],{"type":37,"value":264},"  --memory=512Mi",{"type":32,"tag":115,"props":266,"children":267},{"style":144},[268],{"type":37,"value":147},{"type":32,"tag":115,"props":270,"children":272},{"class":117,"line":271},11,[273],{"type":32,"tag":115,"props":274,"children":275},{"style":144},[276],{"type":37,"value":277},"  --concurrency=80\n",{"type":32,"tag":33,"props":279,"children":280},{},[281,283,289],{"type":37,"value":282},"The ",{"type":32,"tag":96,"props":284,"children":286},{"className":285},[],[287],{"type":37,"value":288},"CONTAINER_CONFIG",{"type":37,"value":290}," environment variable holds your GTM workspace's exported server container JSON, base64-encoded. This config defines which tags fire on which triggers and how variables are populated. In production, store this config in Cloud Secret Manager—plain text environment variables are a security risk.",{"type":32,"tag":33,"props":292,"children":293},{},[294,296,302,304,310,312,318],{"type":37,"value":295},"Pin the auto-scaling behavior with ",{"type":32,"tag":96,"props":297,"children":299},{"className":298},[],[300],{"type":37,"value":301},"--min-instances=1",{"type":37,"value":303}," to avoid cold starts. If ",{"type":32,"tag":96,"props":305,"children":307},{"className":306},[],[308],{"type":37,"value":309},"min-instances=0",{"type":37,"value":311},", the first hit suffers 1–3 second latency and risks event loss. Keeping one instance warm costs roughly $10 per month but eliminates critical event loss. The ",{"type":32,"tag":96,"props":313,"children":315},{"className":314},[],[316],{"type":37,"value":317},"--concurrency=80",{"type":37,"value":319}," parameter means a single pod can handle 80 parallel requests; calibrate this number via load testing (higher concurrency consumes more memory, lower concurrency triggers unnecessary scaling).",{"type":32,"tag":40,"props":321,"children":323},{"id":322},"conversion-api-integration-meta-tiktok-and-deduplication",[324],{"type":37,"value":325},"Conversion API Integration: Meta, TikTok, and Deduplication",{"type":32,"tag":33,"props":327,"children":328},{},[329],{"type":37,"value":330},"Server-side GTM's most critical use case is supporting Meta Conversion API (CAPI) and TikTok Events API alongside browser pixels. Sending the same event through both channels reaches 100% of the signal: if pixel fails on iOS due to ATT, the server event survives; if server lacks IP data, browser user agent completes it. However, reporting the same event twice breaks attribution—deduplication is mandatory.",{"type":32,"tag":33,"props":332,"children":333},{},[334,336,342,344,349,351,357],{"type":37,"value":335},"Meta CAPI expects an ",{"type":32,"tag":96,"props":337,"children":339},{"className":338},[],[340],{"type":37,"value":341},"event_id",{"type":37,"value":343}," field in every event payload. If you send the same ",{"type":32,"tag":96,"props":345,"children":347},{"className":346},[],[348],{"type":37,"value":341},{"type":37,"value":350}," + ",{"type":32,"tag":96,"props":352,"children":354},{"className":353},[],[355],{"type":37,"value":356},"event_name",{"type":37,"value":358}," combination within 48 hours, Meta automatically deduplicates. A simple implementation: generate a UUID on the client when the pixel fires, pass the same UUID to both the pixel and server-side GTM.",{"type":32,"tag":105,"props":360,"children":364},{"className":361,"code":362,"language":363,"meta":16,"style":16},"language-javascript shiki shiki-themes github-dark","\u002F\u002F Client-side (web GTM or gtag.js)\nconst eventId = crypto.randomUUID(); \u002F\u002F browser UUID\nfbq('track', 'Purchase', { value: 99.90, currency: 'USD' }, { eventID: eventId });\n\n\u002F\u002F Send the same eventId to server-side GTM via data layer\ndataLayer.push({\n  event: 'purchase',\n  event_id: eventId,\n  value: 99.90,\n  currency: 'USD'\n});\n","javascript",[365],{"type":32,"tag":96,"props":366,"children":367},{"__ignoreMap":16},[368,377,417,470,479,487,505,523,531,547,560],{"type":32,"tag":115,"props":369,"children":370},{"class":117,"line":118},[371],{"type":32,"tag":115,"props":372,"children":374},{"style":373},"--shiki-default:#6A737D",[375],{"type":37,"value":376},"\u002F\u002F Client-side (web GTM or gtag.js)\n",{"type":32,"tag":115,"props":378,"children":379},{"class":117,"line":150},[380,386,391,396,402,407,412],{"type":32,"tag":115,"props":381,"children":383},{"style":382},"--shiki-default:#F97583",[384],{"type":37,"value":385},"const",{"type":32,"tag":115,"props":387,"children":388},{"style":144},[389],{"type":37,"value":390}," eventId",{"type":32,"tag":115,"props":392,"children":393},{"style":382},[394],{"type":37,"value":395}," =",{"type":32,"tag":115,"props":397,"children":399},{"style":398},"--shiki-default:#E1E4E8",[400],{"type":37,"value":401}," crypto.",{"type":32,"tag":115,"props":403,"children":404},{"style":122},[405],{"type":37,"value":406},"randomUUID",{"type":32,"tag":115,"props":408,"children":409},{"style":398},[410],{"type":37,"value":411},"(); ",{"type":32,"tag":115,"props":413,"children":414},{"style":373},[415],{"type":37,"value":416},"\u002F\u002F browser UUID\n",{"type":32,"tag":115,"props":418,"children":419},{"class":117,"line":163},[420,425,430,435,440,445,450,455,460,465],{"type":32,"tag":115,"props":421,"children":422},{"style":122},[423],{"type":37,"value":424},"fbq",{"type":32,"tag":115,"props":426,"children":427},{"style":398},[428],{"type":37,"value":429},"(",{"type":32,"tag":115,"props":431,"children":432},{"style":128},[433],{"type":37,"value":434},"'track'",{"type":32,"tag":115,"props":436,"children":437},{"style":398},[438],{"type":37,"value":439},", ",{"type":32,"tag":115,"props":441,"children":442},{"style":128},[443],{"type":37,"value":444},"'Purchase'",{"type":32,"tag":115,"props":446,"children":447},{"style":398},[448],{"type":37,"value":449},", { value: ",{"type":32,"tag":115,"props":451,"children":452},{"style":144},[453],{"type":37,"value":454},"99.90",{"type":32,"tag":115,"props":456,"children":457},{"style":398},[458],{"type":37,"value":459},", currency: ",{"type":32,"tag":115,"props":461,"children":462},{"style":128},[463],{"type":37,"value":464},"'USD'",{"type":32,"tag":115,"props":466,"children":467},{"style":398},[468],{"type":37,"value":469}," }, { eventID: eventId });\n",{"type":32,"tag":115,"props":471,"children":472},{"class":117,"line":176},[473],{"type":32,"tag":115,"props":474,"children":476},{"emptyLinePlaceholder":475},true,[477],{"type":37,"value":478},"\n",{"type":32,"tag":115,"props":480,"children":481},{"class":117,"line":189},[482],{"type":32,"tag":115,"props":483,"children":484},{"style":373},[485],{"type":37,"value":486},"\u002F\u002F Send the same eventId to server-side GTM via data layer\n",{"type":32,"tag":115,"props":488,"children":489},{"class":117,"line":202},[490,495,500],{"type":32,"tag":115,"props":491,"children":492},{"style":398},[493],{"type":37,"value":494},"dataLayer.",{"type":32,"tag":115,"props":496,"children":497},{"style":122},[498],{"type":37,"value":499},"push",{"type":32,"tag":115,"props":501,"children":502},{"style":398},[503],{"type":37,"value":504},"({\n",{"type":32,"tag":115,"props":506,"children":507},{"class":117,"line":220},[508,513,518],{"type":32,"tag":115,"props":509,"children":510},{"style":398},[511],{"type":37,"value":512},"  event: ",{"type":32,"tag":115,"props":514,"children":515},{"style":128},[516],{"type":37,"value":517},"'purchase'",{"type":32,"tag":115,"props":519,"children":520},{"style":398},[521],{"type":37,"value":522},",\n",{"type":32,"tag":115,"props":524,"children":525},{"class":117,"line":26},[526],{"type":32,"tag":115,"props":527,"children":528},{"style":398},[529],{"type":37,"value":530},"  event_id: eventId,\n",{"type":32,"tag":115,"props":532,"children":533},{"class":117,"line":245},[534,539,543],{"type":32,"tag":115,"props":535,"children":536},{"style":398},[537],{"type":37,"value":538},"  value: ",{"type":32,"tag":115,"props":540,"children":541},{"style":144},[542],{"type":37,"value":454},{"type":32,"tag":115,"props":544,"children":545},{"style":398},[546],{"type":37,"value":522},{"type":32,"tag":115,"props":548,"children":549},{"class":117,"line":258},[550,555],{"type":32,"tag":115,"props":551,"children":552},{"style":398},[553],{"type":37,"value":554},"  currency: ",{"type":32,"tag":115,"props":556,"children":557},{"style":128},[558],{"type":37,"value":559},"'USD'\n",{"type":32,"tag":115,"props":561,"children":562},{"class":117,"line":271},[563],{"type":32,"tag":115,"props":564,"children":565},{"style":398},[566],{"type":37,"value":567},"});\n",{"type":32,"tag":33,"props":569,"children":570},{},[571,573,579],{"type":37,"value":572},"Map the \"Event ID\" variable in your server-side GTM Meta CAPI tag to ",{"type":32,"tag":96,"props":574,"children":576},{"className":575},[],[577],{"type":37,"value":578},"{{event_id}}",{"type":37,"value":580},". This unifies browser and server events. Monitor deduplication rate in Meta's Events Manager > Diagnostics (Match Quality target: >80%).",{"type":32,"tag":33,"props":582,"children":583},{},[584,586,591,593,599],{"type":37,"value":585},"TikTok Events API uses similar ",{"type":32,"tag":96,"props":587,"children":589},{"className":588},[],[590],{"type":37,"value":341},{"type":37,"value":592}," logic. However, you must forward TikTok's cookie (",{"type":32,"tag":96,"props":594,"children":596},{"className":595},[],[597],{"type":37,"value":598},"_ttp",{"type":37,"value":600},") from client to server. Pass this data via first-party cookie or POST body. If using Cloudflare Workers, write middleware at the edge to parse cookies and inject them into the GTM container.",{"type":32,"tag":84,"props":602,"children":604},{"id":603},"deduplication-table-and-event-hash-verification",[605],{"type":37,"value":606},"Deduplication Table and Event Hash Verification",{"type":32,"tag":33,"props":608,"children":609},{},[610,612,617,619,625],{"type":37,"value":611},"In high-traffic scenarios, the same user might \"add to cart\" twice in seconds—browser and server events arrive with different ",{"type":32,"tag":96,"props":613,"children":615},{"className":614},[],[616],{"type":37,"value":341},{"type":37,"value":618}," values. An external deduplication layer is needed: build an ",{"type":32,"tag":96,"props":620,"children":622},{"className":621},[],[623],{"type":37,"value":624},"event_hash",{"type":37,"value":626}," table in BigQuery.",{"type":32,"tag":105,"props":628,"children":632},{"className":629,"code":630,"language":631,"meta":16,"style":16},"language-sql shiki shiki-themes github-dark","CREATE TABLE analytics.event_dedup (\n  event_hash STRING NOT NULL,\n  event_time TIMESTAMP NOT NULL,\n  user_id STRING,\n  event_name STRING\n)\nPARTITION BY DATE(event_time)\nCLUSTER BY event_hash\nOPTIONS (\n  partition_expiration_days = 7\n);\n","sql",[633],{"type":32,"tag":96,"props":634,"children":635},{"__ignoreMap":16},[636,659,676,698,706,714,722,745,763,771,789],{"type":32,"tag":115,"props":637,"children":638},{"class":117,"line":118},[639,644,649,654],{"type":32,"tag":115,"props":640,"children":641},{"style":382},[642],{"type":37,"value":643},"CREATE",{"type":32,"tag":115,"props":645,"children":646},{"style":382},[647],{"type":37,"value":648}," TABLE",{"type":32,"tag":115,"props":650,"children":651},{"style":122},[652],{"type":37,"value":653}," analytics",{"type":32,"tag":115,"props":655,"children":656},{"style":398},[657],{"type":37,"value":658},".event_dedup (\n",{"type":32,"tag":115,"props":660,"children":661},{"class":117,"line":150},[662,667,672],{"type":32,"tag":115,"props":663,"children":664},{"style":398},[665],{"type":37,"value":666},"  event_hash STRING ",{"type":32,"tag":115,"props":668,"children":669},{"style":382},[670],{"type":37,"value":671},"NOT NULL",{"type":32,"tag":115,"props":673,"children":674},{"style":398},[675],{"type":37,"value":522},{"type":32,"tag":115,"props":677,"children":678},{"class":117,"line":163},[679,684,689,694],{"type":32,"tag":115,"props":680,"children":681},{"style":398},[682],{"type":37,"value":683},"  event_time ",{"type":32,"tag":115,"props":685,"children":686},{"style":382},[687],{"type":37,"value":688},"TIMESTAMP",{"type":32,"tag":115,"props":690,"children":691},{"style":382},[692],{"type":37,"value":693}," NOT NULL",{"type":32,"tag":115,"props":695,"children":696},{"style":398},[697],{"type":37,"value":522},{"type":32,"tag":115,"props":699,"children":700},{"class":117,"line":176},[701],{"type":32,"tag":115,"props":702,"children":703},{"style":398},[704],{"type":37,"value":705},"  user_id STRING,\n",{"type":32,"tag":115,"props":707,"children":708},{"class":117,"line":189},[709],{"type":32,"tag":115,"props":710,"children":711},{"style":398},[712],{"type":37,"value":713},"  event_name STRING\n",{"type":32,"tag":115,"props":715,"children":716},{"class":117,"line":202},[717],{"type":32,"tag":115,"props":718,"children":719},{"style":398},[720],{"type":37,"value":721},")\n",{"type":32,"tag":115,"props":723,"children":724},{"class":117,"line":220},[725,730,735,740],{"type":32,"tag":115,"props":726,"children":727},{"style":382},[728],{"type":37,"value":729},"PARTITION",{"type":32,"tag":115,"props":731,"children":732},{"style":382},[733],{"type":37,"value":734}," BY",{"type":32,"tag":115,"props":736,"children":737},{"style":382},[738],{"type":37,"value":739}," DATE",{"type":32,"tag":115,"props":741,"children":742},{"style":398},[743],{"type":37,"value":744},"(event_time)\n",{"type":32,"tag":115,"props":746,"children":747},{"class":117,"line":26},[748,753,758],{"type":32,"tag":115,"props":749,"children":750},{"style":398},[751],{"type":37,"value":752},"CLUSTER ",{"type":32,"tag":115,"props":754,"children":755},{"style":382},[756],{"type":37,"value":757},"BY",{"type":32,"tag":115,"props":759,"children":760},{"style":398},[761],{"type":37,"value":762}," event_hash\n",{"type":32,"tag":115,"props":764,"children":765},{"class":117,"line":245},[766],{"type":32,"tag":115,"props":767,"children":768},{"style":398},[769],{"type":37,"value":770},"OPTIONS (\n",{"type":32,"tag":115,"props":772,"children":773},{"class":117,"line":258},[774,779,784],{"type":32,"tag":115,"props":775,"children":776},{"style":398},[777],{"type":37,"value":778},"  partition_expiration_days ",{"type":32,"tag":115,"props":780,"children":781},{"style":382},[782],{"type":37,"value":783},"=",{"type":32,"tag":115,"props":785,"children":786},{"style":144},[787],{"type":37,"value":788}," 7\n",{"type":32,"tag":115,"props":790,"children":791},{"class":117,"line":271},[792],{"type":32,"tag":115,"props":793,"children":794},{"style":398},[795],{"type":37,"value":796},");\n",{"type":32,"tag":33,"props":798,"children":799},{},[800,802,808,810,816,818,827],{"type":37,"value":801},"In server-side GTM, compute a custom variable: ",{"type":32,"tag":96,"props":803,"children":805},{"className":804},[],[806],{"type":37,"value":807},"SHA256(user_id + event_name + FLOOR(timestamp\u002F60))",{"type":37,"value":809},". This hash groups the same user's same event within a 1-minute window. Before firing a tag, query BigQuery: ",{"type":32,"tag":96,"props":811,"children":813},{"className":812},[],[814],{"type":37,"value":815},"SELECT COUNT(*) WHERE event_hash = {{computed_hash}}",{"type":37,"value":817},". If a row exists, skip the tag. Combined with identity resolution in a ",{"type":32,"tag":819,"props":820,"children":824},"a",{"href":821,"rel":822},"https:\u002F\u002Fwww.roibase.com.tr\u002Fen\u002Ffirstparty",[823],"nofollow",[825],{"type":37,"value":826},"first-party data architecture",{"type":37,"value":828},", this pattern creates a powerful signal-quality layer.",{"type":32,"tag":40,"props":830,"children":832},{"id":831},"load-balancing-error-handling-and-retry-strategy",[833],{"type":37,"value":834},"Load Balancing, Error Handling, and Retry Strategy",{"type":32,"tag":33,"props":836,"children":837},{},[838],{"type":37,"value":839},"A single Cloud Run instance is insufficient for production. Use Cloud Load Balancer or Cloudflare proxy for traffic distribution. Cloud Load Balancer binds a NEG (Network Endpoint Group) to your Cloud Run backend, terminates SSL, and provides DDoS protection. Cloudflare Workers KV store enables IP rate limiting—abusive traffic is blocked before reaching your tagging server.",{"type":32,"tag":33,"props":841,"children":842},{},[843,845,850],{"type":37,"value":844},"Error handling operates on two levels. First, ",{"type":32,"tag":57,"props":846,"children":847},{},[848],{"type":37,"value":849},"GTM tag level",{"type":37,"value":851},": should a Meta CAPI tag retry on 5xx errors? GTM lacks native retry, but you can implement exponential backoff in a custom HTML tag:",{"type":32,"tag":105,"props":853,"children":855},{"className":361,"code":854,"language":363,"meta":16,"style":16},"async function sendWithRetry(url, payload, maxRetries = 3) {\n  for (let i = 0; i \u003C maxRetries; i++) {\n    const res = await fetch(url, { method: 'POST', body: JSON.stringify(payload) });\n    if (res.ok) return res;\n    if (res.status \u003C 500) break; \u002F\u002F Don't retry on 4xx\n    await new Promise(r => setTimeout(r, 2 ** i * 1000)); \u002F\u002F 1s, 2s, 4s\n  }\n  throw new Error('Max retries exceeded');\n}\n",[856],{"type":32,"tag":96,"props":857,"children":858},{"__ignoreMap":16},[859,919,975,1037,1060,1101,1177,1185,1215],{"type":32,"tag":115,"props":860,"children":861},{"class":117,"line":118},[862,867,872,877,881,887,891,896,900,905,909,914],{"type":32,"tag":115,"props":863,"children":864},{"style":382},[865],{"type":37,"value":866},"async",{"type":32,"tag":115,"props":868,"children":869},{"style":382},[870],{"type":37,"value":871}," function",{"type":32,"tag":115,"props":873,"children":874},{"style":122},[875],{"type":37,"value":876}," sendWithRetry",{"type":32,"tag":115,"props":878,"children":879},{"style":398},[880],{"type":37,"value":429},{"type":32,"tag":115,"props":882,"children":884},{"style":883},"--shiki-default:#FFAB70",[885],{"type":37,"value":886},"url",{"type":32,"tag":115,"props":888,"children":889},{"style":398},[890],{"type":37,"value":439},{"type":32,"tag":115,"props":892,"children":893},{"style":883},[894],{"type":37,"value":895},"payload",{"type":32,"tag":115,"props":897,"children":898},{"style":398},[899],{"type":37,"value":439},{"type":32,"tag":115,"props":901,"children":902},{"style":883},[903],{"type":37,"value":904},"maxRetries",{"type":32,"tag":115,"props":906,"children":907},{"style":382},[908],{"type":37,"value":395},{"type":32,"tag":115,"props":910,"children":911},{"style":144},[912],{"type":37,"value":913}," 3",{"type":32,"tag":115,"props":915,"children":916},{"style":398},[917],{"type":37,"value":918},") {\n",{"type":32,"tag":115,"props":920,"children":921},{"class":117,"line":150},[922,927,932,937,942,946,951,956,961,966,971],{"type":32,"tag":115,"props":923,"children":924},{"style":382},[925],{"type":37,"value":926},"  for",{"type":32,"tag":115,"props":928,"children":929},{"style":398},[930],{"type":37,"value":931}," (",{"type":32,"tag":115,"props":933,"children":934},{"style":382},[935],{"type":37,"value":936},"let",{"type":32,"tag":115,"props":938,"children":939},{"style":398},[940],{"type":37,"value":941}," i ",{"type":32,"tag":115,"props":943,"children":944},{"style":382},[945],{"type":37,"value":783},{"type":32,"tag":115,"props":947,"children":948},{"style":144},[949],{"type":37,"value":950}," 0",{"type":32,"tag":115,"props":952,"children":953},{"style":398},[954],{"type":37,"value":955},"; i ",{"type":32,"tag":115,"props":957,"children":958},{"style":382},[959],{"type":37,"value":960},"\u003C",{"type":32,"tag":115,"props":962,"children":963},{"style":398},[964],{"type":37,"value":965}," maxRetries; i",{"type":32,"tag":115,"props":967,"children":968},{"style":382},[969],{"type":37,"value":970},"++",{"type":32,"tag":115,"props":972,"children":973},{"style":398},[974],{"type":37,"value":918},{"type":32,"tag":115,"props":976,"children":977},{"class":117,"line":163},[978,983,988,992,997,1002,1007,1012,1017,1022,1027,1032],{"type":32,"tag":115,"props":979,"children":980},{"style":382},[981],{"type":37,"value":982},"    const",{"type":32,"tag":115,"props":984,"children":985},{"style":144},[986],{"type":37,"value":987}," res",{"type":32,"tag":115,"props":989,"children":990},{"style":382},[991],{"type":37,"value":395},{"type":32,"tag":115,"props":993,"children":994},{"style":382},[995],{"type":37,"value":996}," await",{"type":32,"tag":115,"props":998,"children":999},{"style":122},[1000],{"type":37,"value":1001}," fetch",{"type":32,"tag":115,"props":1003,"children":1004},{"style":398},[1005],{"type":37,"value":1006},"(url, { method: ",{"type":32,"tag":115,"props":1008,"children":1009},{"style":128},[1010],{"type":37,"value":1011},"'POST'",{"type":32,"tag":115,"props":1013,"children":1014},{"style":398},[1015],{"type":37,"value":1016},", body: ",{"type":32,"tag":115,"props":1018,"children":1019},{"style":144},[1020],{"type":37,"value":1021},"JSON",{"type":32,"tag":115,"props":1023,"children":1024},{"style":398},[1025],{"type":37,"value":1026},".",{"type":32,"tag":115,"props":1028,"children":1029},{"style":122},[1030],{"type":37,"value":1031},"stringify",{"type":32,"tag":115,"props":1033,"children":1034},{"style":398},[1035],{"type":37,"value":1036},"(payload) });\n",{"type":32,"tag":115,"props":1038,"children":1039},{"class":117,"line":176},[1040,1045,1050,1055],{"type":32,"tag":115,"props":1041,"children":1042},{"style":382},[1043],{"type":37,"value":1044},"    if",{"type":32,"tag":115,"props":1046,"children":1047},{"style":398},[1048],{"type":37,"value":1049}," (res.ok) ",{"type":32,"tag":115,"props":1051,"children":1052},{"style":382},[1053],{"type":37,"value":1054},"return",{"type":32,"tag":115,"props":1056,"children":1057},{"style":398},[1058],{"type":37,"value":1059}," res;\n",{"type":32,"tag":115,"props":1061,"children":1062},{"class":117,"line":189},[1063,1067,1072,1076,1081,1086,1091,1096],{"type":32,"tag":115,"props":1064,"children":1065},{"style":382},[1066],{"type":37,"value":1044},{"type":32,"tag":115,"props":1068,"children":1069},{"style":398},[1070],{"type":37,"value":1071}," (res.status ",{"type":32,"tag":115,"props":1073,"children":1074},{"style":382},[1075],{"type":37,"value":960},{"type":32,"tag":115,"props":1077,"children":1078},{"style":144},[1079],{"type":37,"value":1080}," 500",{"type":32,"tag":115,"props":1082,"children":1083},{"style":398},[1084],{"type":37,"value":1085},") ",{"type":32,"tag":115,"props":1087,"children":1088},{"style":382},[1089],{"type":37,"value":1090},"break",{"type":32,"tag":115,"props":1092,"children":1093},{"style":398},[1094],{"type":37,"value":1095},"; ",{"type":32,"tag":115,"props":1097,"children":1098},{"style":373},[1099],{"type":37,"value":1100},"\u002F\u002F Don't retry on 4xx\n",{"type":32,"tag":115,"props":1102,"children":1103},{"class":117,"line":202},[1104,1109,1114,1119,1123,1128,1133,1138,1143,1148,1153,1157,1162,1167,1172],{"type":32,"tag":115,"props":1105,"children":1106},{"style":382},[1107],{"type":37,"value":1108},"    await",{"type":32,"tag":115,"props":1110,"children":1111},{"style":382},[1112],{"type":37,"value":1113}," new",{"type":32,"tag":115,"props":1115,"children":1116},{"style":144},[1117],{"type":37,"value":1118}," Promise",{"type":32,"tag":115,"props":1120,"children":1121},{"style":398},[1122],{"type":37,"value":429},{"type":32,"tag":115,"props":1124,"children":1125},{"style":883},[1126],{"type":37,"value":1127},"r",{"type":32,"tag":115,"props":1129,"children":1130},{"style":382},[1131],{"type":37,"value":1132}," =>",{"type":32,"tag":115,"props":1134,"children":1135},{"style":122},[1136],{"type":37,"value":1137}," setTimeout",{"type":32,"tag":115,"props":1139,"children":1140},{"style":398},[1141],{"type":37,"value":1142},"(r, ",{"type":32,"tag":115,"props":1144,"children":1145},{"style":144},[1146],{"type":37,"value":1147},"2",{"type":32,"tag":115,"props":1149,"children":1150},{"style":382},[1151],{"type":37,"value":1152}," **",{"type":32,"tag":115,"props":1154,"children":1155},{"style":398},[1156],{"type":37,"value":941},{"type":32,"tag":115,"props":1158,"children":1159},{"style":382},[1160],{"type":37,"value":1161},"*",{"type":32,"tag":115,"props":1163,"children":1164},{"style":144},[1165],{"type":37,"value":1166}," 1000",{"type":32,"tag":115,"props":1168,"children":1169},{"style":398},[1170],{"type":37,"value":1171},")); ",{"type":32,"tag":115,"props":1173,"children":1174},{"style":373},[1175],{"type":37,"value":1176},"\u002F\u002F 1s, 2s, 4s\n",{"type":32,"tag":115,"props":1178,"children":1179},{"class":117,"line":220},[1180],{"type":32,"tag":115,"props":1181,"children":1182},{"style":398},[1183],{"type":37,"value":1184},"  }\n",{"type":32,"tag":115,"props":1186,"children":1187},{"class":117,"line":26},[1188,1193,1197,1202,1206,1211],{"type":32,"tag":115,"props":1189,"children":1190},{"style":382},[1191],{"type":37,"value":1192},"  throw",{"type":32,"tag":115,"props":1194,"children":1195},{"style":382},[1196],{"type":37,"value":1113},{"type":32,"tag":115,"props":1198,"children":1199},{"style":122},[1200],{"type":37,"value":1201}," Error",{"type":32,"tag":115,"props":1203,"children":1204},{"style":398},[1205],{"type":37,"value":429},{"type":32,"tag":115,"props":1207,"children":1208},{"style":128},[1209],{"type":37,"value":1210},"'Max retries exceeded'",{"type":32,"tag":115,"props":1212,"children":1213},{"style":398},[1214],{"type":37,"value":796},{"type":32,"tag":115,"props":1216,"children":1217},{"class":117,"line":245},[1218],{"type":32,"tag":115,"props":1219,"children":1220},{"style":398},[1221],{"type":37,"value":1222},"}\n",{"type":32,"tag":33,"props":1224,"children":1225},{},[1226,1228,1233],{"type":37,"value":1227},"Second, ",{"type":32,"tag":57,"props":1229,"children":1230},{},[1231],{"type":37,"value":1232},"dead letter queue level",{"type":37,"value":1234},": route 5xx errors from Cloud Run logs to a Pub\u002FSub topic; a background worker pool retries these events for 24 hours. This pattern reduces event loss to 0.01%. Write the dead letter queue to BigQuery and analyze patterns—for example, requests from a specific region might constantly timeout.",{"type":32,"tag":84,"props":1236,"children":1238},{"id":1237},"monitoring-latency-error-rate-and-cost-per-event",[1239],{"type":37,"value":1240},"Monitoring: Latency, Error Rate, and Cost per Event",{"type":32,"tag":33,"props":1242,"children":1243},{},[1244],{"type":37,"value":1245},"Production-ready setup is incomplete without metrics. Track three core metrics:",{"type":32,"tag":1247,"props":1248,"children":1249},"table",{},[1250,1274],{"type":32,"tag":1251,"props":1252,"children":1253},"thead",{},[1254],{"type":32,"tag":1255,"props":1256,"children":1257},"tr",{},[1258,1264,1269],{"type":32,"tag":1259,"props":1260,"children":1261},"th",{},[1262],{"type":37,"value":1263},"Metric",{"type":32,"tag":1259,"props":1265,"children":1266},{},[1267],{"type":37,"value":1268},"Target",{"type":32,"tag":1259,"props":1270,"children":1271},{},[1272],{"type":37,"value":1273},"Alert Threshold",{"type":32,"tag":1275,"props":1276,"children":1277},"tbody",{},[1278,1297,1315],{"type":32,"tag":1255,"props":1279,"children":1280},{},[1281,1287,1292],{"type":32,"tag":1282,"props":1283,"children":1284},"td",{},[1285],{"type":37,"value":1286},"p95 request latency",{"type":32,"tag":1282,"props":1288,"children":1289},{},[1290],{"type":37,"value":1291},"\u003C500ms",{"type":32,"tag":1282,"props":1293,"children":1294},{},[1295],{"type":37,"value":1296},">1000ms",{"type":32,"tag":1255,"props":1298,"children":1299},{},[1300,1305,1310],{"type":32,"tag":1282,"props":1301,"children":1302},{},[1303],{"type":37,"value":1304},"Error rate (5xx \u002F total)",{"type":32,"tag":1282,"props":1306,"children":1307},{},[1308],{"type":37,"value":1309},"\u003C0.1%",{"type":32,"tag":1282,"props":1311,"children":1312},{},[1313],{"type":37,"value":1314},">1%",{"type":32,"tag":1255,"props":1316,"children":1317},{},[1318,1323,1328],{"type":32,"tag":1282,"props":1319,"children":1320},{},[1321],{"type":37,"value":1322},"Cost per event",{"type":32,"tag":1282,"props":1324,"children":1325},{},[1326],{"type":37,"value":1327},"\u003C$0.0001",{"type":32,"tag":1282,"props":1329,"children":1330},{},[1331],{"type":37,"value":1332},">$0.001",{"type":32,"tag":33,"props":1334,"children":1335},{},[1336],{"type":37,"value":1337},"Connect Cloud Run metrics to a Cloud Monitoring dashboard. Latency spikes usually stem from downstream APIs (Meta, GA4) slowing down—apply the circuit breaker pattern: if Meta doesn't respond within 10 seconds, temporarily disable that tag. Calculate cost per event by dividing monthly Cloud Run charges by total hits. If cost exceeds $0.0001, optimize concurrency or instance size.",{"type":32,"tag":33,"props":1339,"children":1340},{},[1341],{"type":37,"value":1342},"Set up Slack webhook or PagerDuty alerting. When error rate exceeds 1%, trigger automatic rollback (use Cloud Run revision management to revert to the last stable version). This automation reduces production incidents to 5 minutes.",{"type":32,"tag":40,"props":1344,"children":1346},{"id":1345},"identity-resolution-and-user-id-forwarding",[1347],{"type":37,"value":1348},"Identity Resolution and User ID Forwarding",{"type":32,"tag":33,"props":1350,"children":1351},{},[1352,1354,1360],{"type":37,"value":1353},"Server-side GTM's greatest strength is forwarding first-party identity to downstream systems. By sending a logged-in user's ",{"type":32,"tag":96,"props":1355,"children":1357},{"className":1356},[],[1358],{"type":37,"value":1359},"user_id",{"type":37,"value":1361}," to GA4, Meta CAPI, and your CDP simultaneously, you enable cross-device attribution. However, GDPR and similar regulations require explicit consent before sending PII—don't send even hashed email or phone without approval.",{"type":32,"tag":33,"props":1363,"children":1364},{},[1365,1367,1373,1375,1381,1383,1389,1391,1396,1398,1404,1406,1412,1414,1420,1422,1428],{"type":37,"value":1366},"Configure a \"Consent Mode v2\" trigger in the GTM server container: check ",{"type":32,"tag":96,"props":1368,"children":1370},{"className":1369},[],[1371],{"type":37,"value":1372},"ad_storage",{"type":37,"value":1374}," and ",{"type":32,"tag":96,"props":1376,"children":1378},{"className":1377},[],[1379],{"type":37,"value":1380},"analytics_storage",{"type":37,"value":1382}," consent states. Without consent, send only anonymous ",{"type":32,"tag":96,"props":1384,"children":1386},{"className":1385},[],[1387],{"type":37,"value":1388},"client_id",{"type":37,"value":1390},"; with consent, add SHA256(email) and ",{"type":32,"tag":96,"props":1392,"children":1394},{"className":1393},[],[1395],{"type":37,"value":1359},{"type":37,"value":1397},". For Meta CAPI, populate ",{"type":32,"tag":96,"props":1399,"children":1401},{"className":1400},[],[1402],{"type":37,"value":1403},"em",{"type":37,"value":1405}," (hashed email), ",{"type":32,"tag":96,"props":1407,"children":1409},{"className":1408},[],[1410],{"type":37,"value":1411},"ph",{"type":37,"value":1413}," (hashed phone), ",{"type":32,"tag":96,"props":1415,"children":1417},{"className":1416},[],[1418],{"type":37,"value":1419},"fn",{"type":37,"value":1421},"\u002F",{"type":32,"tag":96,"props":1423,"children":1425},{"className":1424},[],[1426],{"type":37,"value":1427},"ln",{"type":37,"value":1429}," (hashed first\u002Flast name) fields. TikTok and Google Ads support similar advanced matching fields.",{"type":32,"tag":33,"props":1431,"children":1432},{},[1433,1435,1441,1443,1448,1450,1455,1457,1462],{"type":37,"value":1434},"Manage identity resolution logic in a centralized ",{"type":32,"tag":96,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":37,"value":1440},"user_identity",{"type":37,"value":1442}," table in BigQuery. Every server-side hit queries this table to fill gaps—for example, if a ",{"type":32,"tag":96,"props":1444,"children":1446},{"className":1445},[],[1447],{"type":37,"value":1388},{"type":37,"value":1449}," from a cookie matches a known ",{"type":32,"tag":96,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":37,"value":1359},{"type":37,"value":1456},", inject that ",{"type":32,"tag":96,"props":1458,"children":1460},{"className":1459},[],[1461],{"type":37,"value":1359},{"type":37,"value":1463}," into all events. Combined with CDP architecture, this pattern delivers a 360-degree customer view.",{"type":32,"tag":40,"props":1465,"children":1467},{"id":1466},"cloudflare-workers-alternative-edge-deployment",[1468],{"type":37,"value":1469},"Cloudflare Workers Alternative: Edge Deployment",{"type":32,"tag":33,"props":1471,"children":1472},{},[1473],{"type":37,"value":1474},"You can also deploy a GTM container on Cloudflare Workers. Workers run on V8 isolates with zero cold start (0ms), but CPU limits (10ms CPU time per request) and bundle size (1MB) constraints apply. Google's official GTM image won't fit in Workers—you'll need a custom lightweight tagging layer.",{"type":32,"tag":33,"props":1476,"children":1477},{},[1478],{"type":37,"value":1479},"Workers advantages: global edge (300+ locations), built-in DDoS protection, Cloudflare KV with sub-millisecond cache. Disadvantages: no GTM GUI tag management (code-based config only), no direct BigQuery integration (Workers → Pub\u002FSub → BigQuery pipeline required). Choose Workers for high RPS (>10k req\u002Fs), low-latency scenarios—for example, mobile game analytics.",{"type":32,"tag":40,"props":1481,"children":1483},{"id":1482},"production-checklist-pre-deployment-verification",[1484],{"type":37,"value":1485},"Production Checklist: Pre-Deployment Verification",{"type":32,"tag":33,"props":1487,"children":1488},{},[1489],{"type":37,"value":1490},"Do not deploy without completing these items:",{"type":32,"tag":1492,"props":1493,"children":1494},"ol",{},[1495,1506,1523,1533,1543,1553,1563],{"type":32,"tag":1496,"props":1497,"children":1498},"li",{},[1499,1504],{"type":32,"tag":57,"props":1500,"children":1501},{},[1502],{"type":37,"value":1503},"Is container config versioned?",{"type":37,"value":1505}," Every workspace change must be committed to Git.",{"type":32,"tag":1496,"props":1507,"children":1508},{},[1509,1514,1516,1521],{"type":32,"tag":57,"props":1510,"children":1511},{},[1512],{"type":37,"value":1513},"Is deduplication logic tested?",{"type":37,"value":1515}," Send the same ",{"type":32,"tag":96,"props":1517,"children":1519},{"className":1518},[],[1520],{"type":37,"value":341},{"type":37,"value":1522}," twice and verify a single event appears in the dashboard.",{"type":32,"tag":1496,"props":1524,"children":1525},{},[1526,1531],{"type":32,"tag":57,"props":1527,"children":1528},{},[1529],{"type":37,"value":1530},"Is dead letter queue set up?",{"type":37,"value":1532}," 5xx errors must not vanish.",{"type":32,"tag":1496,"props":1534,"children":1535},{},[1536,1541],{"type":32,"tag":57,"props":1537,"children":1538},{},[1539],{"type":37,"value":1540},"Is cost alerting configured?",{"type":37,"value":1542}," Receive an email if daily spending exceeds $X.",{"type":32,"tag":1496,"props":1544,"children":1545},{},[1546,1551],{"type":32,"tag":57,"props":1547,"children":1548},{},[1549],{"type":37,"value":1550},"Is Consent Mode integrated?",{"type":37,"value":1552}," Are consent signals from your consent management platform (OneTrust, Cookiebot) synchronized with GTM triggers?",{"type":32,"tag":1496,"props":1554,"children":1555},{},[1556,1561],{"type":32,"tag":57,"props":1557,"children":1558},{},[1559],{"type":37,"value":1560},"Is SSL\u002FTLS correct?",{"type":37,"value":1562}," If using a custom domain, is certificate renewal automated (Let's Encrypt or Cloud CDN managed certificate)?",{"type":32,"tag":1496,"props":1564,"children":1565},{},[1566,1571],{"type":32,"tag":57,"props":1567,"children":1568},{},[1569],{"type":37,"value":1570},"Has load testing been performed?",{"type":37,"value":1572}," Simulate 1000 RPS with k6 or Locust and observe instance scaling behavior.",{"type":32,"tag":33,"props":1574,"children":1575},{},[1576],{"type":37,"value":1577},"Migrate to production gradually. Week one: route 10% of traffic to server-side GTM (using Cloud Load Balancer weighted backends) while 90% remains on the legacy client-side setup. Compare metrics: conversion count, revenue attribution, session duration. If no anomalies, increase by 10% daily. Migration completes in 10 days.",{"type":32,"tag":33,"props":1579,"children":1580},{},[1581],{"type":37,"value":1582},"Server-side GTM and Conversion API, used together, form the most robust measurement stack for the post-cookie era. Yet maintaining this stack in production requires monitoring, deduplication, and cost optimization. The patterns above power Roibase's production systems, processing 50M+ events daily while delivering 99.9% uptime. Deploy your container now and observe the first 1000 hits—note the latency, error rate, and cost per event. These three numbers reveal your setup's quality.",{"type":32,"tag":1584,"props":1585,"children":1586},"style",{},[1587],{"type":37,"value":1588},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":163,"depth":163,"links":1590},[1591,1594,1597,1600,1601,1602],{"id":42,"depth":150,"text":45,"children":1592},[1593],{"id":86,"depth":163,"text":89},{"id":322,"depth":150,"text":325,"children":1595},[1596],{"id":603,"depth":163,"text":606},{"id":831,"depth":150,"text":834,"children":1598},[1599],{"id":1237,"depth":163,"text":1240},{"id":1345,"depth":150,"text":1348},{"id":1466,"depth":150,"text":1469},{"id":1482,"depth":150,"text":1485},"markdown","content:en:data:server-side-gtm-conversion-api-production-deployment.md","content","en\u002Fdata\u002Fserver-side-gtm-conversion-api-production-deployment.md","en\u002Fdata\u002Fserver-side-gtm-conversion-api-production-deployment","md",1785967486605]