[{"data":1,"prerenderedAt":3546},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fru\u002Ftech\u002Fmigracao-ecommerce-headless-roadmap-gestao-risco":13},{"i18nKey":4,"paths":5},"tech-006-2026-06",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Ftech\u002Fheadless-ecommerce-migration-roadmap","\u002Fen\u002Ftech\u002Fheadless-ecommerce-migration-roadmap-risk-management","\u002Fes\u002Ftech\u002Fmigracion-headless-hoja-ruta-gestion-riesgos","\u002Ffr\u002Ftech\u002Fstrategie-migration-headless-commerce","\u002Fit\u002Ftech\u002Fmigrazione-headless-e-commerce-roadmap-e-gestione-rischi","\u002Fru\u002Ftech\u002Fmigracao-ecommerce-headless-roadmap-gestao-risco","\u002Ftr\u002Ftech\u002Fheadless-e-ticaret-migration-roadmap-ve-risk-yonetimi",{"_path":11,"_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":3540,"_id":3541,"_source":3542,"_file":3543,"_stem":3544,"_extension":3545},"tech",false,"","Migração de E-Commerce Headless: Roadmap e Gestão de Risco","Estratégia de rollout faseado, proteção de SEO e análise de abandono de carrinho para planejar a transição para e-commerce headless com números concretos.","2026-06-28",[21,22,23,24,25],"headless-commerce","migracao","preservacao-seo","otimizacao-performance","gestao-risco",8,"Roibase",{"type":29,"children":30,"toc":3527},"root",[31,39,46,51,792,805,818,825,830,1003,1008,1014,1019,1024,1134,1139,1409,1430,1839,1844,1850,1882,1888,1893,1898,2547,2552,2877,2890,2896,2901,2907,2912,2917,3320,3325,3330,3364,3510,3516,3521],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","A migração de uma plataforma de e-commerce monolítica para arquitetura headless não é um \"replatform\" da noite para o dia. Em 2026, um site de e-commerce médio processa mais de 50.000 requisições diárias, sendo 40% delas originadas de busca orgânica — cada segundo de inatividade representa uma perda de $5.000+ em receita. Considerando esses números, a estratégia de migração exige disciplina de engenharia: rollout faseado, proteção de URLs canônicas, medição microscópica do fluxo de adição ao carrinho. Neste artigo, compartilharemos um roadmap testado em produção para transição headless, decisões técnicas que evitam quedas de SEO e métricas de monitoramento para manter a taxa de abandono de carrinho sob controle, com exemplos de código concretos.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"rollout-faseado-segmentação-de-tráfego-e-canary-deployment",[44],{"type":37,"value":45},"Rollout Faseado: Segmentação de Tráfego e Canary Deployment",{"type":32,"tag":33,"props":47,"children":48},{},[49],{"type":37,"value":50},"A decisão mais crítica em uma migração headless é: qual segmento de usuários você direcionará primeiro para o novo sistema. Um deployment big-bang carrega 100% de risco de downtime; a abordagem correta é dividir o tráfego no nível do CDN de edge. Com Cloudflare Workers, você pode direcionar 5% dos novos usuários para o frontend headless mantendo o restante na stack antiga.",{"type":32,"tag":52,"props":53,"children":57},"pre",{"className":54,"code":55,"language":56,"meta":16,"style":16},"language-javascript shiki shiki-themes github-dark","\u002F\u002F Cloudflare Worker: Roteamento faseado de headless\naddEventListener('fetch', event => {\n  event.respondWith(handleRequest(event.request))\n})\n\nasync function handleRequest(request) {\n  const url = new URL(request.url)\n  const userId = request.headers.get('X-User-ID') || Math.random()\n  const rolloutPercent = 5 \u002F\u002F Direciona 5% para headless\n  \n  const isNewStack = (hashCode(userId) % 100) \u003C rolloutPercent\n  \n  if (isNewStack && url.pathname.startsWith('\u002Fproducts')) {\n    \u002F\u002F Redireciona para origin Nuxt\u002FNext headless\n    return fetch('https:\u002F\u002Fheadless-origin.example.com' + url.pathname, request)\n  } else {\n    \u002F\u002F Mantém origin Shopify Liquid original\n    return fetch('https:\u002F\u002Flegacy-origin.example.com' + url.pathname, request)\n  }\n}\n\nfunction hashCode(str) {\n  let hash = 0\n  for (let i = 0; i \u003C str.length; i++) {\n    hash = ((hash \u003C\u003C 5) - hash) + str.charCodeAt(i)\n    hash |= 0\n  }\n  return Math.abs(hash)\n}\n","javascript",[58],{"type":32,"tag":59,"props":60,"children":61},"code",{"__ignoreMap":16},[62,74,118,146,155,165,198,233,293,320,329,385,393,436,445,478,496,505,534,543,552,560,587,611,676,736,753,761,784],{"type":32,"tag":63,"props":64,"children":67},"span",{"class":65,"line":66},"line",1,[68],{"type":32,"tag":63,"props":69,"children":71},{"style":70},"--shiki-default:#6A737D",[72],{"type":37,"value":73},"\u002F\u002F Cloudflare Worker: Roteamento faseado de headless\n",{"type":32,"tag":63,"props":75,"children":77},{"class":65,"line":76},2,[78,84,90,96,101,107,113],{"type":32,"tag":63,"props":79,"children":81},{"style":80},"--shiki-default:#B392F0",[82],{"type":37,"value":83},"addEventListener",{"type":32,"tag":63,"props":85,"children":87},{"style":86},"--shiki-default:#E1E4E8",[88],{"type":37,"value":89},"(",{"type":32,"tag":63,"props":91,"children":93},{"style":92},"--shiki-default:#9ECBFF",[94],{"type":37,"value":95},"'fetch'",{"type":32,"tag":63,"props":97,"children":98},{"style":86},[99],{"type":37,"value":100},", ",{"type":32,"tag":63,"props":102,"children":104},{"style":103},"--shiki-default:#FFAB70",[105],{"type":37,"value":106},"event",{"type":32,"tag":63,"props":108,"children":110},{"style":109},"--shiki-default:#F97583",[111],{"type":37,"value":112}," =>",{"type":32,"tag":63,"props":114,"children":115},{"style":86},[116],{"type":37,"value":117}," {\n",{"type":32,"tag":63,"props":119,"children":121},{"class":65,"line":120},3,[122,127,132,136,141],{"type":32,"tag":63,"props":123,"children":124},{"style":86},[125],{"type":37,"value":126},"  event.",{"type":32,"tag":63,"props":128,"children":129},{"style":80},[130],{"type":37,"value":131},"respondWith",{"type":32,"tag":63,"props":133,"children":134},{"style":86},[135],{"type":37,"value":89},{"type":32,"tag":63,"props":137,"children":138},{"style":80},[139],{"type":37,"value":140},"handleRequest",{"type":32,"tag":63,"props":142,"children":143},{"style":86},[144],{"type":37,"value":145},"(event.request))\n",{"type":32,"tag":63,"props":147,"children":149},{"class":65,"line":148},4,[150],{"type":32,"tag":63,"props":151,"children":152},{"style":86},[153],{"type":37,"value":154},"})\n",{"type":32,"tag":63,"props":156,"children":158},{"class":65,"line":157},5,[159],{"type":32,"tag":63,"props":160,"children":162},{"emptyLinePlaceholder":161},true,[163],{"type":37,"value":164},"\n",{"type":32,"tag":63,"props":166,"children":168},{"class":65,"line":167},6,[169,174,179,184,188,193],{"type":32,"tag":63,"props":170,"children":171},{"style":109},[172],{"type":37,"value":173},"async",{"type":32,"tag":63,"props":175,"children":176},{"style":109},[177],{"type":37,"value":178}," function",{"type":32,"tag":63,"props":180,"children":181},{"style":80},[182],{"type":37,"value":183}," handleRequest",{"type":32,"tag":63,"props":185,"children":186},{"style":86},[187],{"type":37,"value":89},{"type":32,"tag":63,"props":189,"children":190},{"style":103},[191],{"type":37,"value":192},"request",{"type":32,"tag":63,"props":194,"children":195},{"style":86},[196],{"type":37,"value":197},") {\n",{"type":32,"tag":63,"props":199,"children":201},{"class":65,"line":200},7,[202,207,213,218,223,228],{"type":32,"tag":63,"props":203,"children":204},{"style":109},[205],{"type":37,"value":206},"  const",{"type":32,"tag":63,"props":208,"children":210},{"style":209},"--shiki-default:#79B8FF",[211],{"type":37,"value":212}," url",{"type":32,"tag":63,"props":214,"children":215},{"style":109},[216],{"type":37,"value":217}," =",{"type":32,"tag":63,"props":219,"children":220},{"style":109},[221],{"type":37,"value":222}," new",{"type":32,"tag":63,"props":224,"children":225},{"style":80},[226],{"type":37,"value":227}," URL",{"type":32,"tag":63,"props":229,"children":230},{"style":86},[231],{"type":37,"value":232},"(request.url)\n",{"type":32,"tag":63,"props":234,"children":235},{"class":65,"line":26},[236,240,245,249,254,259,263,268,273,278,283,288],{"type":32,"tag":63,"props":237,"children":238},{"style":109},[239],{"type":37,"value":206},{"type":32,"tag":63,"props":241,"children":242},{"style":209},[243],{"type":37,"value":244}," userId",{"type":32,"tag":63,"props":246,"children":247},{"style":109},[248],{"type":37,"value":217},{"type":32,"tag":63,"props":250,"children":251},{"style":86},[252],{"type":37,"value":253}," request.headers.",{"type":32,"tag":63,"props":255,"children":256},{"style":80},[257],{"type":37,"value":258},"get",{"type":32,"tag":63,"props":260,"children":261},{"style":86},[262],{"type":37,"value":89},{"type":32,"tag":63,"props":264,"children":265},{"style":92},[266],{"type":37,"value":267},"'X-User-ID'",{"type":32,"tag":63,"props":269,"children":270},{"style":86},[271],{"type":37,"value":272},") ",{"type":32,"tag":63,"props":274,"children":275},{"style":109},[276],{"type":37,"value":277},"||",{"type":32,"tag":63,"props":279,"children":280},{"style":86},[281],{"type":37,"value":282}," Math.",{"type":32,"tag":63,"props":284,"children":285},{"style":80},[286],{"type":37,"value":287},"random",{"type":32,"tag":63,"props":289,"children":290},{"style":86},[291],{"type":37,"value":292},"()\n",{"type":32,"tag":63,"props":294,"children":296},{"class":65,"line":295},9,[297,301,306,310,315],{"type":32,"tag":63,"props":298,"children":299},{"style":109},[300],{"type":37,"value":206},{"type":32,"tag":63,"props":302,"children":303},{"style":209},[304],{"type":37,"value":305}," rolloutPercent",{"type":32,"tag":63,"props":307,"children":308},{"style":109},[309],{"type":37,"value":217},{"type":32,"tag":63,"props":311,"children":312},{"style":209},[313],{"type":37,"value":314}," 5",{"type":32,"tag":63,"props":316,"children":317},{"style":70},[318],{"type":37,"value":319}," \u002F\u002F Direciona 5% para headless\n",{"type":32,"tag":63,"props":321,"children":323},{"class":65,"line":322},10,[324],{"type":32,"tag":63,"props":325,"children":326},{"style":86},[327],{"type":37,"value":328},"  \n",{"type":32,"tag":63,"props":330,"children":332},{"class":65,"line":331},11,[333,337,342,346,351,356,361,366,371,375,380],{"type":32,"tag":63,"props":334,"children":335},{"style":109},[336],{"type":37,"value":206},{"type":32,"tag":63,"props":338,"children":339},{"style":209},[340],{"type":37,"value":341}," isNewStack",{"type":32,"tag":63,"props":343,"children":344},{"style":109},[345],{"type":37,"value":217},{"type":32,"tag":63,"props":347,"children":348},{"style":86},[349],{"type":37,"value":350}," (",{"type":32,"tag":63,"props":352,"children":353},{"style":80},[354],{"type":37,"value":355},"hashCode",{"type":32,"tag":63,"props":357,"children":358},{"style":86},[359],{"type":37,"value":360},"(userId) ",{"type":32,"tag":63,"props":362,"children":363},{"style":109},[364],{"type":37,"value":365},"%",{"type":32,"tag":63,"props":367,"children":368},{"style":209},[369],{"type":37,"value":370}," 100",{"type":32,"tag":63,"props":372,"children":373},{"style":86},[374],{"type":37,"value":272},{"type":32,"tag":63,"props":376,"children":377},{"style":109},[378],{"type":37,"value":379},"\u003C",{"type":32,"tag":63,"props":381,"children":382},{"style":86},[383],{"type":37,"value":384}," rolloutPercent\n",{"type":32,"tag":63,"props":386,"children":388},{"class":65,"line":387},12,[389],{"type":32,"tag":63,"props":390,"children":391},{"style":86},[392],{"type":37,"value":328},{"type":32,"tag":63,"props":394,"children":396},{"class":65,"line":395},13,[397,402,407,412,417,422,426,431],{"type":32,"tag":63,"props":398,"children":399},{"style":109},[400],{"type":37,"value":401},"  if",{"type":32,"tag":63,"props":403,"children":404},{"style":86},[405],{"type":37,"value":406}," (isNewStack ",{"type":32,"tag":63,"props":408,"children":409},{"style":109},[410],{"type":37,"value":411},"&&",{"type":32,"tag":63,"props":413,"children":414},{"style":86},[415],{"type":37,"value":416}," url.pathname.",{"type":32,"tag":63,"props":418,"children":419},{"style":80},[420],{"type":37,"value":421},"startsWith",{"type":32,"tag":63,"props":423,"children":424},{"style":86},[425],{"type":37,"value":89},{"type":32,"tag":63,"props":427,"children":428},{"style":92},[429],{"type":37,"value":430},"'\u002Fproducts'",{"type":32,"tag":63,"props":432,"children":433},{"style":86},[434],{"type":37,"value":435},")) {\n",{"type":32,"tag":63,"props":437,"children":439},{"class":65,"line":438},14,[440],{"type":32,"tag":63,"props":441,"children":442},{"style":70},[443],{"type":37,"value":444},"    \u002F\u002F Redireciona para origin Nuxt\u002FNext headless\n",{"type":32,"tag":63,"props":446,"children":448},{"class":65,"line":447},15,[449,454,459,463,468,473],{"type":32,"tag":63,"props":450,"children":451},{"style":109},[452],{"type":37,"value":453},"    return",{"type":32,"tag":63,"props":455,"children":456},{"style":80},[457],{"type":37,"value":458}," fetch",{"type":32,"tag":63,"props":460,"children":461},{"style":86},[462],{"type":37,"value":89},{"type":32,"tag":63,"props":464,"children":465},{"style":92},[466],{"type":37,"value":467},"'https:\u002F\u002Fheadless-origin.example.com'",{"type":32,"tag":63,"props":469,"children":470},{"style":109},[471],{"type":37,"value":472}," +",{"type":32,"tag":63,"props":474,"children":475},{"style":86},[476],{"type":37,"value":477}," url.pathname, request)\n",{"type":32,"tag":63,"props":479,"children":481},{"class":65,"line":480},16,[482,487,492],{"type":32,"tag":63,"props":483,"children":484},{"style":86},[485],{"type":37,"value":486},"  } ",{"type":32,"tag":63,"props":488,"children":489},{"style":109},[490],{"type":37,"value":491},"else",{"type":32,"tag":63,"props":493,"children":494},{"style":86},[495],{"type":37,"value":117},{"type":32,"tag":63,"props":497,"children":499},{"class":65,"line":498},17,[500],{"type":32,"tag":63,"props":501,"children":502},{"style":70},[503],{"type":37,"value":504},"    \u002F\u002F Mantém origin Shopify Liquid original\n",{"type":32,"tag":63,"props":506,"children":508},{"class":65,"line":507},18,[509,513,517,521,526,530],{"type":32,"tag":63,"props":510,"children":511},{"style":109},[512],{"type":37,"value":453},{"type":32,"tag":63,"props":514,"children":515},{"style":80},[516],{"type":37,"value":458},{"type":32,"tag":63,"props":518,"children":519},{"style":86},[520],{"type":37,"value":89},{"type":32,"tag":63,"props":522,"children":523},{"style":92},[524],{"type":37,"value":525},"'https:\u002F\u002Flegacy-origin.example.com'",{"type":32,"tag":63,"props":527,"children":528},{"style":109},[529],{"type":37,"value":472},{"type":32,"tag":63,"props":531,"children":532},{"style":86},[533],{"type":37,"value":477},{"type":32,"tag":63,"props":535,"children":537},{"class":65,"line":536},19,[538],{"type":32,"tag":63,"props":539,"children":540},{"style":86},[541],{"type":37,"value":542},"  }\n",{"type":32,"tag":63,"props":544,"children":546},{"class":65,"line":545},20,[547],{"type":32,"tag":63,"props":548,"children":549},{"style":86},[550],{"type":37,"value":551},"}\n",{"type":32,"tag":63,"props":553,"children":555},{"class":65,"line":554},21,[556],{"type":32,"tag":63,"props":557,"children":558},{"emptyLinePlaceholder":161},[559],{"type":37,"value":164},{"type":32,"tag":63,"props":561,"children":563},{"class":65,"line":562},22,[564,569,574,578,583],{"type":32,"tag":63,"props":565,"children":566},{"style":109},[567],{"type":37,"value":568},"function",{"type":32,"tag":63,"props":570,"children":571},{"style":80},[572],{"type":37,"value":573}," hashCode",{"type":32,"tag":63,"props":575,"children":576},{"style":86},[577],{"type":37,"value":89},{"type":32,"tag":63,"props":579,"children":580},{"style":103},[581],{"type":37,"value":582},"str",{"type":32,"tag":63,"props":584,"children":585},{"style":86},[586],{"type":37,"value":197},{"type":32,"tag":63,"props":588,"children":590},{"class":65,"line":589},23,[591,596,601,606],{"type":32,"tag":63,"props":592,"children":593},{"style":109},[594],{"type":37,"value":595},"  let",{"type":32,"tag":63,"props":597,"children":598},{"style":86},[599],{"type":37,"value":600}," hash ",{"type":32,"tag":63,"props":602,"children":603},{"style":109},[604],{"type":37,"value":605},"=",{"type":32,"tag":63,"props":607,"children":608},{"style":209},[609],{"type":37,"value":610}," 0\n",{"type":32,"tag":63,"props":612,"children":614},{"class":65,"line":613},24,[615,620,624,629,634,638,643,648,652,657,662,667,672],{"type":32,"tag":63,"props":616,"children":617},{"style":109},[618],{"type":37,"value":619},"  for",{"type":32,"tag":63,"props":621,"children":622},{"style":86},[623],{"type":37,"value":350},{"type":32,"tag":63,"props":625,"children":626},{"style":109},[627],{"type":37,"value":628},"let",{"type":32,"tag":63,"props":630,"children":631},{"style":86},[632],{"type":37,"value":633}," i ",{"type":32,"tag":63,"props":635,"children":636},{"style":109},[637],{"type":37,"value":605},{"type":32,"tag":63,"props":639,"children":640},{"style":209},[641],{"type":37,"value":642}," 0",{"type":32,"tag":63,"props":644,"children":645},{"style":86},[646],{"type":37,"value":647},"; i ",{"type":32,"tag":63,"props":649,"children":650},{"style":109},[651],{"type":37,"value":379},{"type":32,"tag":63,"props":653,"children":654},{"style":86},[655],{"type":37,"value":656}," str.",{"type":32,"tag":63,"props":658,"children":659},{"style":209},[660],{"type":37,"value":661},"length",{"type":32,"tag":63,"props":663,"children":664},{"style":86},[665],{"type":37,"value":666},"; i",{"type":32,"tag":63,"props":668,"children":669},{"style":109},[670],{"type":37,"value":671},"++",{"type":32,"tag":63,"props":673,"children":674},{"style":86},[675],{"type":37,"value":197},{"type":32,"tag":63,"props":677,"children":679},{"class":65,"line":678},25,[680,685,689,694,699,703,707,712,717,722,726,731],{"type":32,"tag":63,"props":681,"children":682},{"style":86},[683],{"type":37,"value":684},"    hash ",{"type":32,"tag":63,"props":686,"children":687},{"style":109},[688],{"type":37,"value":605},{"type":32,"tag":63,"props":690,"children":691},{"style":86},[692],{"type":37,"value":693}," ((hash ",{"type":32,"tag":63,"props":695,"children":696},{"style":109},[697],{"type":37,"value":698},"\u003C\u003C",{"type":32,"tag":63,"props":700,"children":701},{"style":209},[702],{"type":37,"value":314},{"type":32,"tag":63,"props":704,"children":705},{"style":86},[706],{"type":37,"value":272},{"type":32,"tag":63,"props":708,"children":709},{"style":109},[710],{"type":37,"value":711},"-",{"type":32,"tag":63,"props":713,"children":714},{"style":86},[715],{"type":37,"value":716}," hash) ",{"type":32,"tag":63,"props":718,"children":719},{"style":109},[720],{"type":37,"value":721},"+",{"type":32,"tag":63,"props":723,"children":724},{"style":86},[725],{"type":37,"value":656},{"type":32,"tag":63,"props":727,"children":728},{"style":80},[729],{"type":37,"value":730},"charCodeAt",{"type":32,"tag":63,"props":732,"children":733},{"style":86},[734],{"type":37,"value":735},"(i)\n",{"type":32,"tag":63,"props":737,"children":739},{"class":65,"line":738},26,[740,744,749],{"type":32,"tag":63,"props":741,"children":742},{"style":86},[743],{"type":37,"value":684},{"type":32,"tag":63,"props":745,"children":746},{"style":109},[747],{"type":37,"value":748},"|=",{"type":32,"tag":63,"props":750,"children":751},{"style":209},[752],{"type":37,"value":610},{"type":32,"tag":63,"props":754,"children":756},{"class":65,"line":755},27,[757],{"type":32,"tag":63,"props":758,"children":759},{"style":86},[760],{"type":37,"value":542},{"type":32,"tag":63,"props":762,"children":764},{"class":65,"line":763},28,[765,770,774,779],{"type":32,"tag":63,"props":766,"children":767},{"style":109},[768],{"type":37,"value":769},"  return",{"type":32,"tag":63,"props":771,"children":772},{"style":86},[773],{"type":37,"value":282},{"type":32,"tag":63,"props":775,"children":776},{"style":80},[777],{"type":37,"value":778},"abs",{"type":32,"tag":63,"props":780,"children":781},{"style":86},[782],{"type":37,"value":783},"(hash)\n",{"type":32,"tag":63,"props":785,"children":787},{"class":65,"line":786},29,[788],{"type":32,"tag":63,"props":789,"children":790},{"style":86},[791],{"type":37,"value":551},{"type":32,"tag":33,"props":793,"children":794},{},[795,797,803],{"type":37,"value":796},"Nessa abordagem, você aumenta incrementalmente o valor de ",{"type":32,"tag":59,"props":798,"children":800},{"className":799},[],[801],{"type":37,"value":802},"rolloutPercent",{"type":37,"value":804},": 5% → 25% → 50% → 100%. A cada fase, você aguarda 72 horas e monitora anomalias. Observe as métricas críticas: se o Largest Contentful Paint (LCP) era 2.3s no sistema antigo e fica em 1.8s no headless, está bom; se a taxa de sucesso do add-to-cart cair abaixo de 99.2%, execute um rollback imediatamente.",{"type":32,"tag":33,"props":806,"children":807},{},[808,810,816],{"type":37,"value":809},"A segunda dimensão do rollout faseado é a segmentação geográfica: comece em regiões de baixo tráfego (por exemplo, Europa Central) e avance para mercados principais como EUA e Turquia. Use o header ",{"type":32,"tag":59,"props":811,"children":813},{"className":812},[],[814],{"type":37,"value":815},"request.cf.country",{"type":37,"value":817}," do Cloudflare para roteamento baseado em país.",{"type":32,"tag":819,"props":820,"children":822},"h3",{"id":821},"canary-deployment-e-rollback-automático",[823],{"type":37,"value":824},"Canary Deployment e Rollback Automático",{"type":32,"tag":33,"props":826,"children":827},{},[828],{"type":37,"value":829},"Seu pipeline de deployment deve incluir um mecanismo de rollback automático. Se usar Vercel ou Netlify, adicione um health check customizado ao webhook de deployment:",{"type":32,"tag":52,"props":831,"children":835},{"className":832,"code":833,"language":834,"meta":16,"style":16},"language-yaml shiki shiki-themes github-dark","# .github\u002Fworkflows\u002Fdeploy-headless.yml\n- name: Deploy to production\n  run: vercel --prod\n  \n- name: Health check (30s probe)\n  run: |\n    for i in {1..6}; do\n      STATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" https:\u002F\u002Fheadless-origin.example.com\u002Fapi\u002Fhealth)\n      if [ $STATUS -ne 200 ]; then\n        echo \"Health check failed, rolling back\"\n        vercel rollback\n        exit 1\n      fi\n      sleep 5\n    done\n","yaml",[836],{"type":32,"tag":59,"props":837,"children":838},{"__ignoreMap":16},[839,847,871,888,895,915,931,939,947,955,963,971,979,987,995],{"type":32,"tag":63,"props":840,"children":841},{"class":65,"line":66},[842],{"type":32,"tag":63,"props":843,"children":844},{"style":70},[845],{"type":37,"value":846},"# .github\u002Fworkflows\u002Fdeploy-headless.yml\n",{"type":32,"tag":63,"props":848,"children":849},{"class":65,"line":76},[850,855,861,866],{"type":32,"tag":63,"props":851,"children":852},{"style":86},[853],{"type":37,"value":854},"- ",{"type":32,"tag":63,"props":856,"children":858},{"style":857},"--shiki-default:#85E89D",[859],{"type":37,"value":860},"name",{"type":32,"tag":63,"props":862,"children":863},{"style":86},[864],{"type":37,"value":865},": ",{"type":32,"tag":63,"props":867,"children":868},{"style":92},[869],{"type":37,"value":870},"Deploy to production\n",{"type":32,"tag":63,"props":872,"children":873},{"class":65,"line":120},[874,879,883],{"type":32,"tag":63,"props":875,"children":876},{"style":857},[877],{"type":37,"value":878},"  run",{"type":32,"tag":63,"props":880,"children":881},{"style":86},[882],{"type":37,"value":865},{"type":32,"tag":63,"props":884,"children":885},{"style":92},[886],{"type":37,"value":887},"vercel --prod\n",{"type":32,"tag":63,"props":889,"children":890},{"class":65,"line":148},[891],{"type":32,"tag":63,"props":892,"children":893},{"style":86},[894],{"type":37,"value":328},{"type":32,"tag":63,"props":896,"children":897},{"class":65,"line":157},[898,902,906,910],{"type":32,"tag":63,"props":899,"children":900},{"style":86},[901],{"type":37,"value":854},{"type":32,"tag":63,"props":903,"children":904},{"style":857},[905],{"type":37,"value":860},{"type":32,"tag":63,"props":907,"children":908},{"style":86},[909],{"type":37,"value":865},{"type":32,"tag":63,"props":911,"children":912},{"style":92},[913],{"type":37,"value":914},"Health check (30s probe)\n",{"type":32,"tag":63,"props":916,"children":917},{"class":65,"line":167},[918,922,926],{"type":32,"tag":63,"props":919,"children":920},{"style":857},[921],{"type":37,"value":878},{"type":32,"tag":63,"props":923,"children":924},{"style":86},[925],{"type":37,"value":865},{"type":32,"tag":63,"props":927,"children":928},{"style":109},[929],{"type":37,"value":930},"|\n",{"type":32,"tag":63,"props":932,"children":933},{"class":65,"line":200},[934],{"type":32,"tag":63,"props":935,"children":936},{"style":92},[937],{"type":37,"value":938},"    for i in {1..6}; do\n",{"type":32,"tag":63,"props":940,"children":941},{"class":65,"line":26},[942],{"type":32,"tag":63,"props":943,"children":944},{"style":92},[945],{"type":37,"value":946},"      STATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" https:\u002F\u002Fheadless-origin.example.com\u002Fapi\u002Fhealth)\n",{"type":32,"tag":63,"props":948,"children":949},{"class":65,"line":295},[950],{"type":32,"tag":63,"props":951,"children":952},{"style":92},[953],{"type":37,"value":954},"      if [ $STATUS -ne 200 ]; then\n",{"type":32,"tag":63,"props":956,"children":957},{"class":65,"line":322},[958],{"type":32,"tag":63,"props":959,"children":960},{"style":92},[961],{"type":37,"value":962},"        echo \"Health check failed, rolling back\"\n",{"type":32,"tag":63,"props":964,"children":965},{"class":65,"line":331},[966],{"type":32,"tag":63,"props":967,"children":968},{"style":92},[969],{"type":37,"value":970},"        vercel rollback\n",{"type":32,"tag":63,"props":972,"children":973},{"class":65,"line":387},[974],{"type":32,"tag":63,"props":975,"children":976},{"style":92},[977],{"type":37,"value":978},"        exit 1\n",{"type":32,"tag":63,"props":980,"children":981},{"class":65,"line":395},[982],{"type":32,"tag":63,"props":983,"children":984},{"style":92},[985],{"type":37,"value":986},"      fi\n",{"type":32,"tag":63,"props":988,"children":989},{"class":65,"line":438},[990],{"type":32,"tag":63,"props":991,"children":992},{"style":92},[993],{"type":37,"value":994},"      sleep 5\n",{"type":32,"tag":63,"props":996,"children":997},{"class":65,"line":447},[998],{"type":32,"tag":63,"props":999,"children":1000},{"style":92},[1001],{"type":37,"value":1002},"    done\n",{"type":32,"tag":33,"props":1004,"children":1005},{},[1006],{"type":37,"value":1007},"Seu endpoint de health check deve testar sistemas críticos: pool de conexão de banco de dados, taxa de acerto de cache, ping do gateway de pagamento. Se não houver 100% de sucesso em 30 segundos, o deployment reverte automaticamente.",{"type":32,"tag":40,"props":1009,"children":1011},{"id":1010},"preservação-de-seo-urls-canônicas-e-proteção-de-dados-estruturados",[1012],{"type":37,"value":1013},"Preservação de SEO: URLs Canônicas e Proteção de Dados Estruturados",{"type":32,"tag":33,"props":1015,"children":1016},{},[1017],{"type":37,"value":1018},"O maior medo em uma migração headless é a queda de tráfego orgânico. Segundo dados do Google Merchant Center de 2025, 68% dos sites de e-commerce experimentam uma queda de 15%+ no tráfego orgânico nos primeiros 90 dias após replatforming. Isso ocorre porque URLs canônicas mudam, dados estruturados desaparecem ou redirect chains são configurados incorretamente.",{"type":32,"tag":33,"props":1020,"children":1021},{},[1022],{"type":37,"value":1023},"Primeiro, mapeie 1:1 a estrutura de URLs entre sistemas antigos e novos. Se está migrando de Shopify para Next.js:",{"type":32,"tag":1025,"props":1026,"children":1027},"table",{},[1028,1052],{"type":32,"tag":1029,"props":1030,"children":1031},"thead",{},[1032],{"type":32,"tag":1033,"props":1034,"children":1035},"tr",{},[1036,1042,1047],{"type":32,"tag":1037,"props":1038,"children":1039},"th",{},[1040],{"type":37,"value":1041},"Antigo (Shopify Liquid)",{"type":32,"tag":1037,"props":1043,"children":1044},{},[1045],{"type":37,"value":1046},"Novo (Next.js)",{"type":32,"tag":1037,"props":1048,"children":1049},{},[1050],{"type":37,"value":1051},"Status",{"type":32,"tag":1053,"props":1054,"children":1055},"tbody",{},[1056,1082,1108],{"type":32,"tag":1033,"props":1057,"children":1058},{},[1059,1069,1077],{"type":32,"tag":1060,"props":1061,"children":1062},"td",{},[1063],{"type":32,"tag":59,"props":1064,"children":1066},{"className":1065},[],[1067],{"type":37,"value":1068},"\u002Fproducts\u002Fwireless-headphones",{"type":32,"tag":1060,"props":1070,"children":1071},{},[1072],{"type":32,"tag":59,"props":1073,"children":1075},{"className":1074},[],[1076],{"type":37,"value":1068},{"type":32,"tag":1060,"props":1078,"children":1079},{},[1080],{"type":37,"value":1081},"✅ Mesmo slug",{"type":32,"tag":1033,"props":1083,"children":1084},{},[1085,1094,1103],{"type":32,"tag":1060,"props":1086,"children":1087},{},[1088],{"type":32,"tag":59,"props":1089,"children":1091},{"className":1090},[],[1092],{"type":37,"value":1093},"\u002Fcollections\u002Felectronics",{"type":32,"tag":1060,"props":1095,"children":1096},{},[1097],{"type":32,"tag":59,"props":1098,"children":1100},{"className":1099},[],[1101],{"type":37,"value":1102},"\u002Fcategories\u002Felectronics",{"type":32,"tag":1060,"props":1104,"children":1105},{},[1106],{"type":37,"value":1107},"❌ Path mudou — requer redirect 301",{"type":32,"tag":1033,"props":1109,"children":1110},{},[1111,1120,1129],{"type":32,"tag":1060,"props":1112,"children":1113},{},[1114],{"type":32,"tag":59,"props":1115,"children":1117},{"className":1116},[],[1118],{"type":37,"value":1119},"\u002Fpages\u002Fabout",{"type":32,"tag":1060,"props":1121,"children":1122},{},[1123],{"type":32,"tag":59,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":37,"value":1128},"\u002Fabout",{"type":32,"tag":1060,"props":1130,"children":1131},{},[1132],{"type":37,"value":1133},"⚠️ Path encurtou — adicione tag canônica",{"type":32,"tag":33,"props":1135,"children":1136},{},[1137],{"type":37,"value":1138},"Quando há mudança de caminho, configure redirects 301 no nível de Edge. Exemplo com Cloudflare Workers:",{"type":32,"tag":52,"props":1140,"children":1142},{"className":54,"code":1141,"language":56,"meta":16,"style":16},"const REDIRECT_MAP = {\n  '\u002Fcollections\u002Felectronics': '\u002Fcategories\u002Felectronics',\n  '\u002Fpages\u002Fabout': '\u002Fabout'\n}\n\naddEventListener('fetch', event => {\n  const url = new URL(event.request.url)\n  const newPath = REDIRECT_MAP[url.pathname]\n  \n  if (newPath) {\n    return Response.redirect(url.origin + newPath, 301)\n  }\n  \n  event.respondWith(fetch(event.request))\n})\n",[1143],{"type":32,"tag":59,"props":1144,"children":1145},{"__ignoreMap":16},[1146,1167,1189,1206,1213,1220,1251,1279,1304,1311,1323,1364,1371,1378,1402],{"type":32,"tag":63,"props":1147,"children":1148},{"class":65,"line":66},[1149,1154,1159,1163],{"type":32,"tag":63,"props":1150,"children":1151},{"style":109},[1152],{"type":37,"value":1153},"const",{"type":32,"tag":63,"props":1155,"children":1156},{"style":209},[1157],{"type":37,"value":1158}," REDIRECT_MAP",{"type":32,"tag":63,"props":1160,"children":1161},{"style":109},[1162],{"type":37,"value":217},{"type":32,"tag":63,"props":1164,"children":1165},{"style":86},[1166],{"type":37,"value":117},{"type":32,"tag":63,"props":1168,"children":1169},{"class":65,"line":76},[1170,1175,1179,1184],{"type":32,"tag":63,"props":1171,"children":1172},{"style":92},[1173],{"type":37,"value":1174},"  '\u002Fcollections\u002Felectronics'",{"type":32,"tag":63,"props":1176,"children":1177},{"style":86},[1178],{"type":37,"value":865},{"type":32,"tag":63,"props":1180,"children":1181},{"style":92},[1182],{"type":37,"value":1183},"'\u002Fcategories\u002Felectronics'",{"type":32,"tag":63,"props":1185,"children":1186},{"style":86},[1187],{"type":37,"value":1188},",\n",{"type":32,"tag":63,"props":1190,"children":1191},{"class":65,"line":120},[1192,1197,1201],{"type":32,"tag":63,"props":1193,"children":1194},{"style":92},[1195],{"type":37,"value":1196},"  '\u002Fpages\u002Fabout'",{"type":32,"tag":63,"props":1198,"children":1199},{"style":86},[1200],{"type":37,"value":865},{"type":32,"tag":63,"props":1202,"children":1203},{"style":92},[1204],{"type":37,"value":1205},"'\u002Fabout'\n",{"type":32,"tag":63,"props":1207,"children":1208},{"class":65,"line":148},[1209],{"type":32,"tag":63,"props":1210,"children":1211},{"style":86},[1212],{"type":37,"value":551},{"type":32,"tag":63,"props":1214,"children":1215},{"class":65,"line":157},[1216],{"type":32,"tag":63,"props":1217,"children":1218},{"emptyLinePlaceholder":161},[1219],{"type":37,"value":164},{"type":32,"tag":63,"props":1221,"children":1222},{"class":65,"line":167},[1223,1227,1231,1235,1239,1243,1247],{"type":32,"tag":63,"props":1224,"children":1225},{"style":80},[1226],{"type":37,"value":83},{"type":32,"tag":63,"props":1228,"children":1229},{"style":86},[1230],{"type":37,"value":89},{"type":32,"tag":63,"props":1232,"children":1233},{"style":92},[1234],{"type":37,"value":95},{"type":32,"tag":63,"props":1236,"children":1237},{"style":86},[1238],{"type":37,"value":100},{"type":32,"tag":63,"props":1240,"children":1241},{"style":103},[1242],{"type":37,"value":106},{"type":32,"tag":63,"props":1244,"children":1245},{"style":109},[1246],{"type":37,"value":112},{"type":32,"tag":63,"props":1248,"children":1249},{"style":86},[1250],{"type":37,"value":117},{"type":32,"tag":63,"props":1252,"children":1253},{"class":65,"line":200},[1254,1258,1262,1266,1270,1274],{"type":32,"tag":63,"props":1255,"children":1256},{"style":109},[1257],{"type":37,"value":206},{"type":32,"tag":63,"props":1259,"children":1260},{"style":209},[1261],{"type":37,"value":212},{"type":32,"tag":63,"props":1263,"children":1264},{"style":109},[1265],{"type":37,"value":217},{"type":32,"tag":63,"props":1267,"children":1268},{"style":109},[1269],{"type":37,"value":222},{"type":32,"tag":63,"props":1271,"children":1272},{"style":80},[1273],{"type":37,"value":227},{"type":32,"tag":63,"props":1275,"children":1276},{"style":86},[1277],{"type":37,"value":1278},"(event.request.url)\n",{"type":32,"tag":63,"props":1280,"children":1281},{"class":65,"line":26},[1282,1286,1291,1295,1299],{"type":32,"tag":63,"props":1283,"children":1284},{"style":109},[1285],{"type":37,"value":206},{"type":32,"tag":63,"props":1287,"children":1288},{"style":209},[1289],{"type":37,"value":1290}," newPath",{"type":32,"tag":63,"props":1292,"children":1293},{"style":109},[1294],{"type":37,"value":217},{"type":32,"tag":63,"props":1296,"children":1297},{"style":209},[1298],{"type":37,"value":1158},{"type":32,"tag":63,"props":1300,"children":1301},{"style":86},[1302],{"type":37,"value":1303},"[url.pathname]\n",{"type":32,"tag":63,"props":1305,"children":1306},{"class":65,"line":295},[1307],{"type":32,"tag":63,"props":1308,"children":1309},{"style":86},[1310],{"type":37,"value":328},{"type":32,"tag":63,"props":1312,"children":1313},{"class":65,"line":322},[1314,1318],{"type":32,"tag":63,"props":1315,"children":1316},{"style":109},[1317],{"type":37,"value":401},{"type":32,"tag":63,"props":1319,"children":1320},{"style":86},[1321],{"type":37,"value":1322}," (newPath) {\n",{"type":32,"tag":63,"props":1324,"children":1325},{"class":65,"line":331},[1326,1330,1335,1340,1345,1349,1354,1359],{"type":32,"tag":63,"props":1327,"children":1328},{"style":109},[1329],{"type":37,"value":453},{"type":32,"tag":63,"props":1331,"children":1332},{"style":86},[1333],{"type":37,"value":1334}," Response.",{"type":32,"tag":63,"props":1336,"children":1337},{"style":80},[1338],{"type":37,"value":1339},"redirect",{"type":32,"tag":63,"props":1341,"children":1342},{"style":86},[1343],{"type":37,"value":1344},"(url.origin ",{"type":32,"tag":63,"props":1346,"children":1347},{"style":109},[1348],{"type":37,"value":721},{"type":32,"tag":63,"props":1350,"children":1351},{"style":86},[1352],{"type":37,"value":1353}," newPath, ",{"type":32,"tag":63,"props":1355,"children":1356},{"style":209},[1357],{"type":37,"value":1358},"301",{"type":32,"tag":63,"props":1360,"children":1361},{"style":86},[1362],{"type":37,"value":1363},")\n",{"type":32,"tag":63,"props":1365,"children":1366},{"class":65,"line":387},[1367],{"type":32,"tag":63,"props":1368,"children":1369},{"style":86},[1370],{"type":37,"value":542},{"type":32,"tag":63,"props":1372,"children":1373},{"class":65,"line":395},[1374],{"type":32,"tag":63,"props":1375,"children":1376},{"style":86},[1377],{"type":37,"value":328},{"type":32,"tag":63,"props":1379,"children":1380},{"class":65,"line":438},[1381,1385,1389,1393,1398],{"type":32,"tag":63,"props":1382,"children":1383},{"style":86},[1384],{"type":37,"value":126},{"type":32,"tag":63,"props":1386,"children":1387},{"style":80},[1388],{"type":37,"value":131},{"type":32,"tag":63,"props":1390,"children":1391},{"style":86},[1392],{"type":37,"value":89},{"type":32,"tag":63,"props":1394,"children":1395},{"style":80},[1396],{"type":37,"value":1397},"fetch",{"type":32,"tag":63,"props":1399,"children":1400},{"style":86},[1401],{"type":37,"value":145},{"type":32,"tag":63,"props":1403,"children":1404},{"class":65,"line":447},[1405],{"type":32,"tag":63,"props":1406,"children":1407},{"style":86},[1408],{"type":37,"value":154},{"type":32,"tag":33,"props":1410,"children":1411},{},[1412,1414,1420,1422,1428],{"type":37,"value":1413},"Verifique dados estruturados: se o sistema antigo tinha schemas de Product, BreadcrumbList e Organization, o novo deve ter os mesmos. No Next.js, ao invés de usar bibliotecas como ",{"type":32,"tag":59,"props":1415,"children":1417},{"className":1416},[],[1418],{"type":37,"value":1419},"next-seo",{"type":37,"value":1421},", use ",{"type":32,"tag":59,"props":1423,"children":1425},{"className":1424},[],[1426],{"type":37,"value":1427},"\u003Cscript type=\"application\u002Fld+json\">",{"type":37,"value":1429}," manual — a garantia de renderização é maior:",{"type":32,"tag":52,"props":1431,"children":1435},{"className":1432,"code":1433,"language":1434,"meta":16,"style":16},"language-jsx shiki shiki-themes github-dark","\u002F\u002F app\u002Fproducts\u002F[slug]\u002Fpage.tsx\nexport default function ProductPage({ product }) {\n  const structuredData = {\n    \"@context\": \"https:\u002F\u002Fschema.org\",\n    \"@type\": \"Product\",\n    \"name\": product.title,\n    \"sku\": product.sku,\n    \"offers\": {\n      \"@type\": \"Offer\",\n      \"price\": product.price,\n      \"priceCurrency\": \"BRL\",\n      \"availability\": product.stock > 0 ? \"InStock\" : \"OutOfStock\"\n    }\n  }\n  \n  return (\n    \u003C>\n      \u003Cscript\n        type=\"application\u002Fld+json\"\n        dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}\n      \u002F>\n      {\u002F* Product render *\u002F}\n    \u003C\u002F>\n  )\n}\n","jsx",[1436],{"type":32,"tag":59,"props":1437,"children":1438},{"__ignoreMap":16},[1439,1447,1484,1504,1525,1546,1559,1572,1585,1606,1619,1640,1682,1690,1697,1704,1716,1724,1737,1754,1791,1799,1816,1824,1832],{"type":32,"tag":63,"props":1440,"children":1441},{"class":65,"line":66},[1442],{"type":32,"tag":63,"props":1443,"children":1444},{"style":70},[1445],{"type":37,"value":1446},"\u002F\u002F app\u002Fproducts\u002F[slug]\u002Fpage.tsx\n",{"type":32,"tag":63,"props":1448,"children":1449},{"class":65,"line":76},[1450,1455,1460,1464,1469,1474,1479],{"type":32,"tag":63,"props":1451,"children":1452},{"style":109},[1453],{"type":37,"value":1454},"export",{"type":32,"tag":63,"props":1456,"children":1457},{"style":109},[1458],{"type":37,"value":1459}," default",{"type":32,"tag":63,"props":1461,"children":1462},{"style":109},[1463],{"type":37,"value":178},{"type":32,"tag":63,"props":1465,"children":1466},{"style":80},[1467],{"type":37,"value":1468}," ProductPage",{"type":32,"tag":63,"props":1470,"children":1471},{"style":86},[1472],{"type":37,"value":1473},"({ ",{"type":32,"tag":63,"props":1475,"children":1476},{"style":103},[1477],{"type":37,"value":1478},"product",{"type":32,"tag":63,"props":1480,"children":1481},{"style":86},[1482],{"type":37,"value":1483}," }) {\n",{"type":32,"tag":63,"props":1485,"children":1486},{"class":65,"line":120},[1487,1491,1496,1500],{"type":32,"tag":63,"props":1488,"children":1489},{"style":109},[1490],{"type":37,"value":206},{"type":32,"tag":63,"props":1492,"children":1493},{"style":209},[1494],{"type":37,"value":1495}," structuredData",{"type":32,"tag":63,"props":1497,"children":1498},{"style":109},[1499],{"type":37,"value":217},{"type":32,"tag":63,"props":1501,"children":1502},{"style":86},[1503],{"type":37,"value":117},{"type":32,"tag":63,"props":1505,"children":1506},{"class":65,"line":148},[1507,1512,1516,1521],{"type":32,"tag":63,"props":1508,"children":1509},{"style":92},[1510],{"type":37,"value":1511},"    \"@context\"",{"type":32,"tag":63,"props":1513,"children":1514},{"style":86},[1515],{"type":37,"value":865},{"type":32,"tag":63,"props":1517,"children":1518},{"style":92},[1519],{"type":37,"value":1520},"\"https:\u002F\u002Fschema.org\"",{"type":32,"tag":63,"props":1522,"children":1523},{"style":86},[1524],{"type":37,"value":1188},{"type":32,"tag":63,"props":1526,"children":1527},{"class":65,"line":157},[1528,1533,1537,1542],{"type":32,"tag":63,"props":1529,"children":1530},{"style":92},[1531],{"type":37,"value":1532},"    \"@type\"",{"type":32,"tag":63,"props":1534,"children":1535},{"style":86},[1536],{"type":37,"value":865},{"type":32,"tag":63,"props":1538,"children":1539},{"style":92},[1540],{"type":37,"value":1541},"\"Product\"",{"type":32,"tag":63,"props":1543,"children":1544},{"style":86},[1545],{"type":37,"value":1188},{"type":32,"tag":63,"props":1547,"children":1548},{"class":65,"line":167},[1549,1554],{"type":32,"tag":63,"props":1550,"children":1551},{"style":92},[1552],{"type":37,"value":1553},"    \"name\"",{"type":32,"tag":63,"props":1555,"children":1556},{"style":86},[1557],{"type":37,"value":1558},": product.title,\n",{"type":32,"tag":63,"props":1560,"children":1561},{"class":65,"line":200},[1562,1567],{"type":32,"tag":63,"props":1563,"children":1564},{"style":92},[1565],{"type":37,"value":1566},"    \"sku\"",{"type":32,"tag":63,"props":1568,"children":1569},{"style":86},[1570],{"type":37,"value":1571},": product.sku,\n",{"type":32,"tag":63,"props":1573,"children":1574},{"class":65,"line":26},[1575,1580],{"type":32,"tag":63,"props":1576,"children":1577},{"style":92},[1578],{"type":37,"value":1579},"    \"offers\"",{"type":32,"tag":63,"props":1581,"children":1582},{"style":86},[1583],{"type":37,"value":1584},": {\n",{"type":32,"tag":63,"props":1586,"children":1587},{"class":65,"line":295},[1588,1593,1597,1602],{"type":32,"tag":63,"props":1589,"children":1590},{"style":92},[1591],{"type":37,"value":1592},"      \"@type\"",{"type":32,"tag":63,"props":1594,"children":1595},{"style":86},[1596],{"type":37,"value":865},{"type":32,"tag":63,"props":1598,"children":1599},{"style":92},[1600],{"type":37,"value":1601},"\"Offer\"",{"type":32,"tag":63,"props":1603,"children":1604},{"style":86},[1605],{"type":37,"value":1188},{"type":32,"tag":63,"props":1607,"children":1608},{"class":65,"line":322},[1609,1614],{"type":32,"tag":63,"props":1610,"children":1611},{"style":92},[1612],{"type":37,"value":1613},"      \"price\"",{"type":32,"tag":63,"props":1615,"children":1616},{"style":86},[1617],{"type":37,"value":1618},": product.price,\n",{"type":32,"tag":63,"props":1620,"children":1621},{"class":65,"line":331},[1622,1627,1631,1636],{"type":32,"tag":63,"props":1623,"children":1624},{"style":92},[1625],{"type":37,"value":1626},"      \"priceCurrency\"",{"type":32,"tag":63,"props":1628,"children":1629},{"style":86},[1630],{"type":37,"value":865},{"type":32,"tag":63,"props":1632,"children":1633},{"style":92},[1634],{"type":37,"value":1635},"\"BRL\"",{"type":32,"tag":63,"props":1637,"children":1638},{"style":86},[1639],{"type":37,"value":1188},{"type":32,"tag":63,"props":1641,"children":1642},{"class":65,"line":387},[1643,1648,1653,1658,1662,1667,1672,1677],{"type":32,"tag":63,"props":1644,"children":1645},{"style":92},[1646],{"type":37,"value":1647},"      \"availability\"",{"type":32,"tag":63,"props":1649,"children":1650},{"style":86},[1651],{"type":37,"value":1652},": product.stock ",{"type":32,"tag":63,"props":1654,"children":1655},{"style":109},[1656],{"type":37,"value":1657},">",{"type":32,"tag":63,"props":1659,"children":1660},{"style":209},[1661],{"type":37,"value":642},{"type":32,"tag":63,"props":1663,"children":1664},{"style":109},[1665],{"type":37,"value":1666}," ?",{"type":32,"tag":63,"props":1668,"children":1669},{"style":92},[1670],{"type":37,"value":1671}," \"InStock\"",{"type":32,"tag":63,"props":1673,"children":1674},{"style":109},[1675],{"type":37,"value":1676}," :",{"type":32,"tag":63,"props":1678,"children":1679},{"style":92},[1680],{"type":37,"value":1681}," \"OutOfStock\"\n",{"type":32,"tag":63,"props":1683,"children":1684},{"class":65,"line":395},[1685],{"type":32,"tag":63,"props":1686,"children":1687},{"style":86},[1688],{"type":37,"value":1689},"    }\n",{"type":32,"tag":63,"props":1691,"children":1692},{"class":65,"line":438},[1693],{"type":32,"tag":63,"props":1694,"children":1695},{"style":86},[1696],{"type":37,"value":542},{"type":32,"tag":63,"props":1698,"children":1699},{"class":65,"line":447},[1700],{"type":32,"tag":63,"props":1701,"children":1702},{"style":86},[1703],{"type":37,"value":328},{"type":32,"tag":63,"props":1705,"children":1706},{"class":65,"line":480},[1707,1711],{"type":32,"tag":63,"props":1708,"children":1709},{"style":109},[1710],{"type":37,"value":769},{"type":32,"tag":63,"props":1712,"children":1713},{"style":86},[1714],{"type":37,"value":1715}," (\n",{"type":32,"tag":63,"props":1717,"children":1718},{"class":65,"line":498},[1719],{"type":32,"tag":63,"props":1720,"children":1721},{"style":86},[1722],{"type":37,"value":1723},"    \u003C>\n",{"type":32,"tag":63,"props":1725,"children":1726},{"class":65,"line":507},[1727,1732],{"type":32,"tag":63,"props":1728,"children":1729},{"style":86},[1730],{"type":37,"value":1731},"      \u003C",{"type":32,"tag":63,"props":1733,"children":1734},{"style":857},[1735],{"type":37,"value":1736},"script\n",{"type":32,"tag":63,"props":1738,"children":1739},{"class":65,"line":536},[1740,1745,1749],{"type":32,"tag":63,"props":1741,"children":1742},{"style":80},[1743],{"type":37,"value":1744},"        type",{"type":32,"tag":63,"props":1746,"children":1747},{"style":109},[1748],{"type":37,"value":605},{"type":32,"tag":63,"props":1750,"children":1751},{"style":92},[1752],{"type":37,"value":1753},"\"application\u002Fld+json\"\n",{"type":32,"tag":63,"props":1755,"children":1756},{"class":65,"line":545},[1757,1762,1766,1771,1776,1781,1786],{"type":32,"tag":63,"props":1758,"children":1759},{"style":80},[1760],{"type":37,"value":1761},"        dangerouslySetInnerHTML",{"type":32,"tag":63,"props":1763,"children":1764},{"style":109},[1765],{"type":37,"value":605},{"type":32,"tag":63,"props":1767,"children":1768},{"style":86},[1769],{"type":37,"value":1770},"{{ __html: ",{"type":32,"tag":63,"props":1772,"children":1773},{"style":209},[1774],{"type":37,"value":1775},"JSON",{"type":32,"tag":63,"props":1777,"children":1778},{"style":86},[1779],{"type":37,"value":1780},".",{"type":32,"tag":63,"props":1782,"children":1783},{"style":80},[1784],{"type":37,"value":1785},"stringify",{"type":32,"tag":63,"props":1787,"children":1788},{"style":86},[1789],{"type":37,"value":1790},"(structuredData) }}\n",{"type":32,"tag":63,"props":1792,"children":1793},{"class":65,"line":554},[1794],{"type":32,"tag":63,"props":1795,"children":1796},{"style":86},[1797],{"type":37,"value":1798},"      \u002F>\n",{"type":32,"tag":63,"props":1800,"children":1801},{"class":65,"line":562},[1802,1807,1812],{"type":32,"tag":63,"props":1803,"children":1804},{"style":86},[1805],{"type":37,"value":1806},"      {",{"type":32,"tag":63,"props":1808,"children":1809},{"style":70},[1810],{"type":37,"value":1811},"\u002F* Product render *\u002F",{"type":32,"tag":63,"props":1813,"children":1814},{"style":86},[1815],{"type":37,"value":551},{"type":32,"tag":63,"props":1817,"children":1818},{"class":65,"line":589},[1819],{"type":32,"tag":63,"props":1820,"children":1821},{"style":86},[1822],{"type":37,"value":1823},"    \u003C\u002F>\n",{"type":32,"tag":63,"props":1825,"children":1826},{"class":65,"line":613},[1827],{"type":32,"tag":63,"props":1828,"children":1829},{"style":86},[1830],{"type":37,"value":1831},"  )\n",{"type":32,"tag":63,"props":1833,"children":1834},{"class":65,"line":678},[1835],{"type":32,"tag":63,"props":1836,"children":1837},{"style":86},[1838],{"type":37,"value":551},{"type":32,"tag":33,"props":1840,"children":1841},{},[1842],{"type":37,"value":1843},"No Google Search Console, use a ferramenta \"URL Inspection\" para acompanhar o status de indexação das novas páginas. Nos primeiros 30 dias após a migração, revise o relatório semanal de \"Coverage\": se o número de erros \"Indexed, not submitted in sitemap\" for superior a 50, seu sitemap não está funcionando corretamente.",{"type":32,"tag":819,"props":1845,"children":1847},{"id":1846},"minimização-de-redirect-chains",[1848],{"type":37,"value":1849},"Minimização de Redirect Chains",{"type":32,"tag":33,"props":1851,"children":1852},{},[1853,1855,1861,1863,1869,1871,1880],{"type":37,"value":1854},"Limpe cadeias de redirects do sistema antigo. Por exemplo, se no Shopify um produto redireciona ",{"type":32,"tag":59,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":37,"value":1860},"\u002Fproducts\u002Fold-name",{"type":37,"value":1862}," → ",{"type":32,"tag":59,"props":1864,"children":1866},{"className":1865},[],[1867],{"type":37,"value":1868},"\u002Fproducts\u002Fnew-name",{"type":37,"value":1870},", no sistema headless use a URL final diretamente. Mais de dois níveis de redirect (A → B → C) consome o crawl budget do Google e reduz a eficiência de transferência de PageRank. Nos projetos ",{"type":32,"tag":1872,"props":1873,"children":1877},"a",{"href":1874,"rel":1875},"https:\u002F\u002Fwww.roibase.com.tr\u002Fru\u002Fheadless",[1876],"nofollow",[1878],{"type":37,"value":1879},"Headless Commerce",{"type":37,"value":1881}," da Roibase, o processo de auditoria de redirects típico garante uma redução de 40% em cadeias.",{"type":32,"tag":40,"props":1883,"children":1885},{"id":1884},"análise-de-abandono-de-add-to-cart-monitoramento-de-funil-de-conversão",[1886],{"type":37,"value":1887},"Análise de Abandono de Add-to-Cart: Monitoramento de Funil de Conversão",{"type":32,"tag":33,"props":1889,"children":1890},{},[1891],{"type":37,"value":1892},"Durante a migração headless, a métrica mais sensível é a taxa de sucesso do add-to-cart (ATC). Se no sistema antigo a taxa era 99.5% e cai para 98% no novo, isso representa 1.500 carrinhos perdidos por dia (100.000 visitantes × 3% intenção de ATC × 0.5% queda).",{"type":32,"tag":33,"props":1894,"children":1895},{},[1896],{"type":37,"value":1897},"Registre eventos de ATC tanto client-side quanto server-side. Tags do GTM client-side não conseguem capturar todas as falhas de rede; o log server-side é o registro definitivo:",{"type":32,"tag":52,"props":1899,"children":1901},{"className":54,"code":1900,"language":56,"meta":16,"style":16},"\u002F\u002F app\u002Fapi\u002Fcart\u002Fadd\u002Froute.ts (Next.js App Router)\nimport { NextResponse } from 'next\u002Fserver'\nimport { logEvent } from '@\u002Flib\u002Fanalytics'\n\nexport async function POST(request: Request) {\n  const { productId, quantity } = await request.json()\n  const startTime = Date.now()\n  \n  try {\n    const cart = await addToCart(productId, quantity)\n    const duration = Date.now() - startTime\n    \n    \u002F\u002F Evento de log server-side\n    await logEvent({\n      event: 'add_to_cart_success',\n      productId,\n      quantity,\n      duration, \u002F\u002F ms\n      userId: request.headers.get('X-User-ID')\n    })\n    \n    return NextResponse.json({ cart }, { status: 200 })\n  } catch (error) {\n    const duration = Date.now() - startTime\n    \n    await logEvent({\n      event: 'add_to_cart_failure',\n      productId,\n      quantity,\n      duration,\n      error: error.message,\n      userId: request.headers.get('X-User-ID')\n    })\n    \n    return NextResponse.json({ error: 'Failed to add to cart' }, { status: 500 })\n  }\n}\n",[1902],{"type":32,"tag":59,"props":1903,"children":1904},{"__ignoreMap":16},[1905,1913,1936,1957,1964,2007,2061,2091,2098,2110,2141,2179,2187,2195,2213,2230,2238,2246,2259,2283,2291,2298,2329,2346,2381,2388,2403,2419,2426,2433,2442,2451,2475,2483,2491,2531,2539],{"type":32,"tag":63,"props":1906,"children":1907},{"class":65,"line":66},[1908],{"type":32,"tag":63,"props":1909,"children":1910},{"style":70},[1911],{"type":37,"value":1912},"\u002F\u002F app\u002Fapi\u002Fcart\u002Fadd\u002Froute.ts (Next.js App Router)\n",{"type":32,"tag":63,"props":1914,"children":1915},{"class":65,"line":76},[1916,1921,1926,1931],{"type":32,"tag":63,"props":1917,"children":1918},{"style":109},[1919],{"type":37,"value":1920},"import",{"type":32,"tag":63,"props":1922,"children":1923},{"style":86},[1924],{"type":37,"value":1925}," { NextResponse } ",{"type":32,"tag":63,"props":1927,"children":1928},{"style":109},[1929],{"type":37,"value":1930},"from",{"type":32,"tag":63,"props":1932,"children":1933},{"style":92},[1934],{"type":37,"value":1935}," 'next\u002Fserver'\n",{"type":32,"tag":63,"props":1937,"children":1938},{"class":65,"line":120},[1939,1943,1948,1952],{"type":32,"tag":63,"props":1940,"children":1941},{"style":109},[1942],{"type":37,"value":1920},{"type":32,"tag":63,"props":1944,"children":1945},{"style":86},[1946],{"type":37,"value":1947}," { logEvent } ",{"type":32,"tag":63,"props":1949,"children":1950},{"style":109},[1951],{"type":37,"value":1930},{"type":32,"tag":63,"props":1953,"children":1954},{"style":92},[1955],{"type":37,"value":1956}," '@\u002Flib\u002Fanalytics'\n",{"type":32,"tag":63,"props":1958,"children":1959},{"class":65,"line":148},[1960],{"type":32,"tag":63,"props":1961,"children":1962},{"emptyLinePlaceholder":161},[1963],{"type":37,"value":164},{"type":32,"tag":63,"props":1965,"children":1966},{"class":65,"line":157},[1967,1971,1976,1980,1985,1989,1993,1998,2003],{"type":32,"tag":63,"props":1968,"children":1969},{"style":109},[1970],{"type":37,"value":1454},{"type":32,"tag":63,"props":1972,"children":1973},{"style":109},[1974],{"type":37,"value":1975}," async",{"type":32,"tag":63,"props":1977,"children":1978},{"style":109},[1979],{"type":37,"value":178},{"type":32,"tag":63,"props":1981,"children":1982},{"style":80},[1983],{"type":37,"value":1984}," POST",{"type":32,"tag":63,"props":1986,"children":1987},{"style":86},[1988],{"type":37,"value":89},{"type":32,"tag":63,"props":1990,"children":1991},{"style":103},[1992],{"type":37,"value":192},{"type":32,"tag":63,"props":1994,"children":1995},{"style":109},[1996],{"type":37,"value":1997},":",{"type":32,"tag":63,"props":1999,"children":2000},{"style":80},[2001],{"type":37,"value":2002}," Request",{"type":32,"tag":63,"props":2004,"children":2005},{"style":86},[2006],{"type":37,"value":197},{"type":32,"tag":63,"props":2008,"children":2009},{"class":65,"line":167},[2010,2014,2019,2024,2028,2033,2038,2042,2047,2052,2057],{"type":32,"tag":63,"props":2011,"children":2012},{"style":109},[2013],{"type":37,"value":206},{"type":32,"tag":63,"props":2015,"children":2016},{"style":86},[2017],{"type":37,"value":2018}," { ",{"type":32,"tag":63,"props":2020,"children":2021},{"style":209},[2022],{"type":37,"value":2023},"productId",{"type":32,"tag":63,"props":2025,"children":2026},{"style":86},[2027],{"type":37,"value":100},{"type":32,"tag":63,"props":2029,"children":2030},{"style":209},[2031],{"type":37,"value":2032},"quantity",{"type":32,"tag":63,"props":2034,"children":2035},{"style":86},[2036],{"type":37,"value":2037}," } ",{"type":32,"tag":63,"props":2039,"children":2040},{"style":109},[2041],{"type":37,"value":605},{"type":32,"tag":63,"props":2043,"children":2044},{"style":109},[2045],{"type":37,"value":2046}," await",{"type":32,"tag":63,"props":2048,"children":2049},{"style":86},[2050],{"type":37,"value":2051}," request.",{"type":32,"tag":63,"props":2053,"children":2054},{"style":80},[2055],{"type":37,"value":2056},"json",{"type":32,"tag":63,"props":2058,"children":2059},{"style":86},[2060],{"type":37,"value":292},{"type":32,"tag":63,"props":2062,"children":2063},{"class":65,"line":200},[2064,2068,2073,2077,2082,2087],{"type":32,"tag":63,"props":2065,"children":2066},{"style":109},[2067],{"type":37,"value":206},{"type":32,"tag":63,"props":2069,"children":2070},{"style":209},[2071],{"type":37,"value":2072}," startTime",{"type":32,"tag":63,"props":2074,"children":2075},{"style":109},[2076],{"type":37,"value":217},{"type":32,"tag":63,"props":2078,"children":2079},{"style":86},[2080],{"type":37,"value":2081}," Date.",{"type":32,"tag":63,"props":2083,"children":2084},{"style":80},[2085],{"type":37,"value":2086},"now",{"type":32,"tag":63,"props":2088,"children":2089},{"style":86},[2090],{"type":37,"value":292},{"type":32,"tag":63,"props":2092,"children":2093},{"class":65,"line":26},[2094],{"type":32,"tag":63,"props":2095,"children":2096},{"style":86},[2097],{"type":37,"value":328},{"type":32,"tag":63,"props":2099,"children":2100},{"class":65,"line":295},[2101,2106],{"type":32,"tag":63,"props":2102,"children":2103},{"style":109},[2104],{"type":37,"value":2105},"  try",{"type":32,"tag":63,"props":2107,"children":2108},{"style":86},[2109],{"type":37,"value":117},{"type":32,"tag":63,"props":2111,"children":2112},{"class":65,"line":322},[2113,2118,2123,2127,2131,2136],{"type":32,"tag":63,"props":2114,"children":2115},{"style":109},[2116],{"type":37,"value":2117},"    const",{"type":32,"tag":63,"props":2119,"children":2120},{"style":209},[2121],{"type":37,"value":2122}," cart",{"type":32,"tag":63,"props":2124,"children":2125},{"style":109},[2126],{"type":37,"value":217},{"type":32,"tag":63,"props":2128,"children":2129},{"style":109},[2130],{"type":37,"value":2046},{"type":32,"tag":63,"props":2132,"children":2133},{"style":80},[2134],{"type":37,"value":2135}," addToCart",{"type":32,"tag":63,"props":2137,"children":2138},{"style":86},[2139],{"type":37,"value":2140},"(productId, quantity)\n",{"type":32,"tag":63,"props":2142,"children":2143},{"class":65,"line":331},[2144,2148,2153,2157,2161,2165,2170,2174],{"type":32,"tag":63,"props":2145,"children":2146},{"style":109},[2147],{"type":37,"value":2117},{"type":32,"tag":63,"props":2149,"children":2150},{"style":209},[2151],{"type":37,"value":2152}," duration",{"type":32,"tag":63,"props":2154,"children":2155},{"style":109},[2156],{"type":37,"value":217},{"type":32,"tag":63,"props":2158,"children":2159},{"style":86},[2160],{"type":37,"value":2081},{"type":32,"tag":63,"props":2162,"children":2163},{"style":80},[2164],{"type":37,"value":2086},{"type":32,"tag":63,"props":2166,"children":2167},{"style":86},[2168],{"type":37,"value":2169},"() ",{"type":32,"tag":63,"props":2171,"children":2172},{"style":109},[2173],{"type":37,"value":711},{"type":32,"tag":63,"props":2175,"children":2176},{"style":86},[2177],{"type":37,"value":2178}," startTime\n",{"type":32,"tag":63,"props":2180,"children":2181},{"class":65,"line":387},[2182],{"type":32,"tag":63,"props":2183,"children":2184},{"style":86},[2185],{"type":37,"value":2186},"    \n",{"type":32,"tag":63,"props":2188,"children":2189},{"class":65,"line":395},[2190],{"type":32,"tag":63,"props":2191,"children":2192},{"style":70},[2193],{"type":37,"value":2194},"    \u002F\u002F Evento de log server-side\n",{"type":32,"tag":63,"props":2196,"children":2197},{"class":65,"line":438},[2198,2203,2208],{"type":32,"tag":63,"props":2199,"children":2200},{"style":109},[2201],{"type":37,"value":2202},"    await",{"type":32,"tag":63,"props":2204,"children":2205},{"style":80},[2206],{"type":37,"value":2207}," logEvent",{"type":32,"tag":63,"props":2209,"children":2210},{"style":86},[2211],{"type":37,"value":2212},"({\n",{"type":32,"tag":63,"props":2214,"children":2215},{"class":65,"line":447},[2216,2221,2226],{"type":32,"tag":63,"props":2217,"children":2218},{"style":86},[2219],{"type":37,"value":2220},"      event: ",{"type":32,"tag":63,"props":2222,"children":2223},{"style":92},[2224],{"type":37,"value":2225},"'add_to_cart_success'",{"type":32,"tag":63,"props":2227,"children":2228},{"style":86},[2229],{"type":37,"value":1188},{"type":32,"tag":63,"props":2231,"children":2232},{"class":65,"line":480},[2233],{"type":32,"tag":63,"props":2234,"children":2235},{"style":86},[2236],{"type":37,"value":2237},"      productId,\n",{"type":32,"tag":63,"props":2239,"children":2240},{"class":65,"line":498},[2241],{"type":32,"tag":63,"props":2242,"children":2243},{"style":86},[2244],{"type":37,"value":2245},"      quantity,\n",{"type":32,"tag":63,"props":2247,"children":2248},{"class":65,"line":507},[2249,2254],{"type":32,"tag":63,"props":2250,"children":2251},{"style":86},[2252],{"type":37,"value":2253},"      duration, ",{"type":32,"tag":63,"props":2255,"children":2256},{"style":70},[2257],{"type":37,"value":2258},"\u002F\u002F ms\n",{"type":32,"tag":63,"props":2260,"children":2261},{"class":65,"line":536},[2262,2267,2271,2275,2279],{"type":32,"tag":63,"props":2263,"children":2264},{"style":86},[2265],{"type":37,"value":2266},"      userId: request.headers.",{"type":32,"tag":63,"props":2268,"children":2269},{"style":80},[2270],{"type":37,"value":258},{"type":32,"tag":63,"props":2272,"children":2273},{"style":86},[2274],{"type":37,"value":89},{"type":32,"tag":63,"props":2276,"children":2277},{"style":92},[2278],{"type":37,"value":267},{"type":32,"tag":63,"props":2280,"children":2281},{"style":86},[2282],{"type":37,"value":1363},{"type":32,"tag":63,"props":2284,"children":2285},{"class":65,"line":545},[2286],{"type":32,"tag":63,"props":2287,"children":2288},{"style":86},[2289],{"type":37,"value":2290},"    })\n",{"type":32,"tag":63,"props":2292,"children":2293},{"class":65,"line":554},[2294],{"type":32,"tag":63,"props":2295,"children":2296},{"style":86},[2297],{"type":37,"value":2186},{"type":32,"tag":63,"props":2299,"children":2300},{"class":65,"line":562},[2301,2305,2310,2314,2319,2324],{"type":32,"tag":63,"props":2302,"children":2303},{"style":109},[2304],{"type":37,"value":453},{"type":32,"tag":63,"props":2306,"children":2307},{"style":86},[2308],{"type":37,"value":2309}," NextResponse.",{"type":32,"tag":63,"props":2311,"children":2312},{"style":80},[2313],{"type":37,"value":2056},{"type":32,"tag":63,"props":2315,"children":2316},{"style":86},[2317],{"type":37,"value":2318},"({ cart }, { status: ",{"type":32,"tag":63,"props":2320,"children":2321},{"style":209},[2322],{"type":37,"value":2323},"200",{"type":32,"tag":63,"props":2325,"children":2326},{"style":86},[2327],{"type":37,"value":2328}," })\n",{"type":32,"tag":63,"props":2330,"children":2331},{"class":65,"line":589},[2332,2336,2341],{"type":32,"tag":63,"props":2333,"children":2334},{"style":86},[2335],{"type":37,"value":486},{"type":32,"tag":63,"props":2337,"children":2338},{"style":109},[2339],{"type":37,"value":2340},"catch",{"type":32,"tag":63,"props":2342,"children":2343},{"style":86},[2344],{"type":37,"value":2345}," (error) {\n",{"type":32,"tag":63,"props":2347,"children":2348},{"class":65,"line":613},[2349,2353,2357,2361,2365,2369,2373,2377],{"type":32,"tag":63,"props":2350,"children":2351},{"style":109},[2352],{"type":37,"value":2117},{"type":32,"tag":63,"props":2354,"children":2355},{"style":209},[2356],{"type":37,"value":2152},{"type":32,"tag":63,"props":2358,"children":2359},{"style":109},[2360],{"type":37,"value":217},{"type":32,"tag":63,"props":2362,"children":2363},{"style":86},[2364],{"type":37,"value":2081},{"type":32,"tag":63,"props":2366,"children":2367},{"style":80},[2368],{"type":37,"value":2086},{"type":32,"tag":63,"props":2370,"children":2371},{"style":86},[2372],{"type":37,"value":2169},{"type":32,"tag":63,"props":2374,"children":2375},{"style":109},[2376],{"type":37,"value":711},{"type":32,"tag":63,"props":2378,"children":2379},{"style":86},[2380],{"type":37,"value":2178},{"type":32,"tag":63,"props":2382,"children":2383},{"class":65,"line":678},[2384],{"type":32,"tag":63,"props":2385,"children":2386},{"style":86},[2387],{"type":37,"value":2186},{"type":32,"tag":63,"props":2389,"children":2390},{"class":65,"line":738},[2391,2395,2399],{"type":32,"tag":63,"props":2392,"children":2393},{"style":109},[2394],{"type":37,"value":2202},{"type":32,"tag":63,"props":2396,"children":2397},{"style":80},[2398],{"type":37,"value":2207},{"type":32,"tag":63,"props":2400,"children":2401},{"style":86},[2402],{"type":37,"value":2212},{"type":32,"tag":63,"props":2404,"children":2405},{"class":65,"line":755},[2406,2410,2415],{"type":32,"tag":63,"props":2407,"children":2408},{"style":86},[2409],{"type":37,"value":2220},{"type":32,"tag":63,"props":2411,"children":2412},{"style":92},[2413],{"type":37,"value":2414},"'add_to_cart_failure'",{"type":32,"tag":63,"props":2416,"children":2417},{"style":86},[2418],{"type":37,"value":1188},{"type":32,"tag":63,"props":2420,"children":2421},{"class":65,"line":763},[2422],{"type":32,"tag":63,"props":2423,"children":2424},{"style":86},[2425],{"type":37,"value":2237},{"type":32,"tag":63,"props":2427,"children":2428},{"class":65,"line":786},[2429],{"type":32,"tag":63,"props":2430,"children":2431},{"style":86},[2432],{"type":37,"value":2245},{"type":32,"tag":63,"props":2434,"children":2436},{"class":65,"line":2435},30,[2437],{"type":32,"tag":63,"props":2438,"children":2439},{"style":86},[2440],{"type":37,"value":2441},"      duration,\n",{"type":32,"tag":63,"props":2443,"children":2445},{"class":65,"line":2444},31,[2446],{"type":32,"tag":63,"props":2447,"children":2448},{"style":86},[2449],{"type":37,"value":2450},"      error: error.message,\n",{"type":32,"tag":63,"props":2452,"children":2454},{"class":65,"line":2453},32,[2455,2459,2463,2467,2471],{"type":32,"tag":63,"props":2456,"children":2457},{"style":86},[2458],{"type":37,"value":2266},{"type":32,"tag":63,"props":2460,"children":2461},{"style":80},[2462],{"type":37,"value":258},{"type":32,"tag":63,"props":2464,"children":2465},{"style":86},[2466],{"type":37,"value":89},{"type":32,"tag":63,"props":2468,"children":2469},{"style":92},[2470],{"type":37,"value":267},{"type":32,"tag":63,"props":2472,"children":2473},{"style":86},[2474],{"type":37,"value":1363},{"type":32,"tag":63,"props":2476,"children":2478},{"class":65,"line":2477},33,[2479],{"type":32,"tag":63,"props":2480,"children":2481},{"style":86},[2482],{"type":37,"value":2290},{"type":32,"tag":63,"props":2484,"children":2486},{"class":65,"line":2485},34,[2487],{"type":32,"tag":63,"props":2488,"children":2489},{"style":86},[2490],{"type":37,"value":2186},{"type":32,"tag":63,"props":2492,"children":2494},{"class":65,"line":2493},35,[2495,2499,2503,2507,2512,2517,2522,2527],{"type":32,"tag":63,"props":2496,"children":2497},{"style":109},[2498],{"type":37,"value":453},{"type":32,"tag":63,"props":2500,"children":2501},{"style":86},[2502],{"type":37,"value":2309},{"type":32,"tag":63,"props":2504,"children":2505},{"style":80},[2506],{"type":37,"value":2056},{"type":32,"tag":63,"props":2508,"children":2509},{"style":86},[2510],{"type":37,"value":2511},"({ error: ",{"type":32,"tag":63,"props":2513,"children":2514},{"style":92},[2515],{"type":37,"value":2516},"'Failed to add to cart'",{"type":32,"tag":63,"props":2518,"children":2519},{"style":86},[2520],{"type":37,"value":2521}," }, { status: ",{"type":32,"tag":63,"props":2523,"children":2524},{"style":209},[2525],{"type":37,"value":2526},"500",{"type":32,"tag":63,"props":2528,"children":2529},{"style":86},[2530],{"type":37,"value":2328},{"type":32,"tag":63,"props":2532,"children":2534},{"class":65,"line":2533},36,[2535],{"type":32,"tag":63,"props":2536,"children":2537},{"style":86},[2538],{"type":37,"value":542},{"type":32,"tag":63,"props":2540,"children":2542},{"class":65,"line":2541},37,[2543],{"type":32,"tag":63,"props":2544,"children":2545},{"style":86},[2546],{"type":37,"value":551},{"type":32,"tag":33,"props":2548,"children":2549},{},[2550],{"type":37,"value":2551},"Agregue esses logs no BigQuery e configure detecção de anomalias:",{"type":32,"tag":52,"props":2553,"children":2557},{"className":2554,"code":2555,"language":2556,"meta":16,"style":16},"language-sql shiki shiki-themes github-dark","-- Comparação de taxa de sucesso de ATC diária\nSELECT\n  DATE(timestamp) AS date,\n  COUNTIF(event = 'add_to_cart_success') AS success_count,\n  COUNTIF(event = 'add_to_cart_failure') AS failure_count,\n  SAFE_DIVIDE(\n    COUNTIF(event = 'add_to_cart_success'),\n    COUNTIF(event IN ('add_to_cart_success', 'add_to_cart_failure'))\n  ) * 100 AS success_rate_percent\nFROM analytics.events\nWHERE DATE(timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)\nGROUP BY date\nORDER BY date DESC\n","sql",[2558],{"type":32,"tag":59,"props":2559,"children":2560},{"__ignoreMap":16},[2561,2569,2577,2612,2646,2679,2687,2712,2749,2776,2798,2847,2860],{"type":32,"tag":63,"props":2562,"children":2563},{"class":65,"line":66},[2564],{"type":32,"tag":63,"props":2565,"children":2566},{"style":70},[2567],{"type":37,"value":2568},"-- Comparação de taxa de sucesso de ATC diária\n",{"type":32,"tag":63,"props":2570,"children":2571},{"class":65,"line":76},[2572],{"type":32,"tag":63,"props":2573,"children":2574},{"style":109},[2575],{"type":37,"value":2576},"SELECT\n",{"type":32,"tag":63,"props":2578,"children":2579},{"class":65,"line":120},[2580,2585,2589,2594,2598,2603,2608],{"type":32,"tag":63,"props":2581,"children":2582},{"style":109},[2583],{"type":37,"value":2584},"  DATE",{"type":32,"tag":63,"props":2586,"children":2587},{"style":86},[2588],{"type":37,"value":89},{"type":32,"tag":63,"props":2590,"children":2591},{"style":109},[2592],{"type":37,"value":2593},"timestamp",{"type":32,"tag":63,"props":2595,"children":2596},{"style":86},[2597],{"type":37,"value":272},{"type":32,"tag":63,"props":2599,"children":2600},{"style":109},[2601],{"type":37,"value":2602},"AS",{"type":32,"tag":63,"props":2604,"children":2605},{"style":109},[2606],{"type":37,"value":2607}," date",{"type":32,"tag":63,"props":2609,"children":2610},{"style":86},[2611],{"type":37,"value":1188},{"type":32,"tag":63,"props":2613,"children":2614},{"class":65,"line":148},[2615,2620,2624,2628,2633,2637,2641],{"type":32,"tag":63,"props":2616,"children":2617},{"style":86},[2618],{"type":37,"value":2619},"  COUNTIF(",{"type":32,"tag":63,"props":2621,"children":2622},{"style":109},[2623],{"type":37,"value":106},{"type":32,"tag":63,"props":2625,"children":2626},{"style":109},[2627],{"type":37,"value":217},{"type":32,"tag":63,"props":2629,"children":2630},{"style":92},[2631],{"type":37,"value":2632}," 'add_to_cart_success'",{"type":32,"tag":63,"props":2634,"children":2635},{"style":86},[2636],{"type":37,"value":272},{"type":32,"tag":63,"props":2638,"children":2639},{"style":109},[2640],{"type":37,"value":2602},{"type":32,"tag":63,"props":2642,"children":2643},{"style":86},[2644],{"type":37,"value":2645}," success_count,\n",{"type":32,"tag":63,"props":2647,"children":2648},{"class":65,"line":157},[2649,2653,2657,2661,2666,2670,2674],{"type":32,"tag":63,"props":2650,"children":2651},{"style":86},[2652],{"type":37,"value":2619},{"type":32,"tag":63,"props":2654,"children":2655},{"style":109},[2656],{"type":37,"value":106},{"type":32,"tag":63,"props":2658,"children":2659},{"style":109},[2660],{"type":37,"value":217},{"type":32,"tag":63,"props":2662,"children":2663},{"style":92},[2664],{"type":37,"value":2665}," 'add_to_cart_failure'",{"type":32,"tag":63,"props":2667,"children":2668},{"style":86},[2669],{"type":37,"value":272},{"type":32,"tag":63,"props":2671,"children":2672},{"style":109},[2673],{"type":37,"value":2602},{"type":32,"tag":63,"props":2675,"children":2676},{"style":86},[2677],{"type":37,"value":2678}," failure_count,\n",{"type":32,"tag":63,"props":2680,"children":2681},{"class":65,"line":167},[2682],{"type":32,"tag":63,"props":2683,"children":2684},{"style":86},[2685],{"type":37,"value":2686},"  SAFE_DIVIDE(\n",{"type":32,"tag":63,"props":2688,"children":2689},{"class":65,"line":200},[2690,2695,2699,2703,2707],{"type":32,"tag":63,"props":2691,"children":2692},{"style":86},[2693],{"type":37,"value":2694},"    COUNTIF(",{"type":32,"tag":63,"props":2696,"children":2697},{"style":109},[2698],{"type":37,"value":106},{"type":32,"tag":63,"props":2700,"children":2701},{"style":109},[2702],{"type":37,"value":217},{"type":32,"tag":63,"props":2704,"children":2705},{"style":92},[2706],{"type":37,"value":2632},{"type":32,"tag":63,"props":2708,"children":2709},{"style":86},[2710],{"type":37,"value":2711},"),\n",{"type":32,"tag":63,"props":2713,"children":2714},{"class":65,"line":26},[2715,2719,2723,2728,2732,2736,2740,2744],{"type":32,"tag":63,"props":2716,"children":2717},{"style":86},[2718],{"type":37,"value":2694},{"type":32,"tag":63,"props":2720,"children":2721},{"style":109},[2722],{"type":37,"value":106},{"type":32,"tag":63,"props":2724,"children":2725},{"style":109},[2726],{"type":37,"value":2727}," IN",{"type":32,"tag":63,"props":2729,"children":2730},{"style":86},[2731],{"type":37,"value":350},{"type":32,"tag":63,"props":2733,"children":2734},{"style":92},[2735],{"type":37,"value":2225},{"type":32,"tag":63,"props":2737,"children":2738},{"style":86},[2739],{"type":37,"value":100},{"type":32,"tag":63,"props":2741,"children":2742},{"style":92},[2743],{"type":37,"value":2414},{"type":32,"tag":63,"props":2745,"children":2746},{"style":86},[2747],{"type":37,"value":2748},"))\n",{"type":32,"tag":63,"props":2750,"children":2751},{"class":65,"line":295},[2752,2757,2762,2766,2771],{"type":32,"tag":63,"props":2753,"children":2754},{"style":86},[2755],{"type":37,"value":2756},"  ) ",{"type":32,"tag":63,"props":2758,"children":2759},{"style":109},[2760],{"type":37,"value":2761},"*",{"type":32,"tag":63,"props":2763,"children":2764},{"style":209},[2765],{"type":37,"value":370},{"type":32,"tag":63,"props":2767,"children":2768},{"style":109},[2769],{"type":37,"value":2770}," AS",{"type":32,"tag":63,"props":2772,"children":2773},{"style":86},[2774],{"type":37,"value":2775}," success_rate_percent\n",{"type":32,"tag":63,"props":2777,"children":2778},{"class":65,"line":322},[2779,2784,2789,2793],{"type":32,"tag":63,"props":2780,"children":2781},{"style":109},[2782],{"type":37,"value":2783},"FROM",{"type":32,"tag":63,"props":2785,"children":2786},{"style":209},[2787],{"type":37,"value":2788}," analytics",{"type":32,"tag":63,"props":2790,"children":2791},{"style":86},[2792],{"type":37,"value":1780},{"type":32,"tag":63,"props":2794,"children":2795},{"style":209},[2796],{"type":37,"value":2797},"events\n",{"type":32,"tag":63,"props":2799,"children":2800},{"class":65,"line":331},[2801,2806,2811,2815,2819,2823,2828,2833,2838,2843],{"type":32,"tag":63,"props":2802,"children":2803},{"style":109},[2804],{"type":37,"value":2805},"WHERE",{"type":32,"tag":63,"props":2807,"children":2808},{"style":109},[2809],{"type":37,"value":2810}," DATE",{"type":32,"tag":63,"props":2812,"children":2813},{"style":86},[2814],{"type":37,"value":89},{"type":32,"tag":63,"props":2816,"children":2817},{"style":109},[2818],{"type":37,"value":2593},{"type":32,"tag":63,"props":2820,"children":2821},{"style":86},[2822],{"type":37,"value":272},{"type":32,"tag":63,"props":2824,"children":2825},{"style":109},[2826],{"type":37,"value":2827},">=",{"type":32,"tag":63,"props":2829,"children":2830},{"style":86},[2831],{"type":37,"value":2832}," DATE_SUB(CURRENT_DATE(), INTERVAL ",{"type":32,"tag":63,"props":2834,"children":2835},{"style":209},[2836],{"type":37,"value":2837},"7",{"type":32,"tag":63,"props":2839,"children":2840},{"style":109},[2841],{"type":37,"value":2842}," DAY",{"type":32,"tag":63,"props":2844,"children":2845},{"style":86},[2846],{"type":37,"value":1363},{"type":32,"tag":63,"props":2848,"children":2849},{"class":65,"line":387},[2850,2855],{"type":32,"tag":63,"props":2851,"children":2852},{"style":109},[2853],{"type":37,"value":2854},"GROUP BY",{"type":32,"tag":63,"props":2856,"children":2857},{"style":109},[2858],{"type":37,"value":2859}," date\n",{"type":32,"tag":63,"props":2861,"children":2862},{"class":65,"line":395},[2863,2868,2872],{"type":32,"tag":63,"props":2864,"children":2865},{"style":109},[2866],{"type":37,"value":2867},"ORDER BY",{"type":32,"tag":63,"props":2869,"children":2870},{"style":109},[2871],{"type":37,"value":2607},{"type":32,"tag":63,"props":2873,"children":2874},{"style":109},[2875],{"type":37,"value":2876}," DESC\n",{"type":32,"tag":33,"props":2878,"children":2879},{},[2880,2882,2888],{"type":37,"value":2881},"Se a taxa de sucesso cair abaixo de 99%, configure um alerta (webhook do Slack, PagerDuty). Além disso, observe a métrica ",{"type":32,"tag":59,"props":2883,"children":2885},{"className":2884},[],[2886],{"type":37,"value":2887},"duration",{"type":37,"value":2889},": se o tempo médio de resposta de ATC era 120ms no sistema antigo, deve ser 80ms no headless — se subir para 200ms, há otimização de query de banco de dados a fazer.",{"type":32,"tag":819,"props":2891,"children":2893},{"id":2892},"session-replay-e-error-tracking",[2894],{"type":37,"value":2895},"Session Replay e Error Tracking",{"type":32,"tag":33,"props":2897,"children":2898},{},[2899],{"type":37,"value":2900},"Configure uma ferramenta de session replay como Sentry ou LogRocket. Associe eventos de falha de ATC com o ID de sessão para visualizar a jornada completa do usuário: em qual etapa o botão ficou desabilitado, qual requisição de rede sofreu timeout. Em projetos de migração headless da Roibase, 60% dos bugs detectados via session replay são race conditions — por exemplo, a API de verificação de inventário não termina antes da mutação do carrinho, causando habilitação prematura do botão.",{"type":32,"tag":40,"props":2902,"children":2904},{"id":2903},"métricas-de-performance-core-web-vitals-e-custo-de-runtime",[2905],{"type":37,"value":2906},"Métricas de Performance: Core Web Vitals e Custo de Runtime",{"type":32,"tag":33,"props":2908,"children":2909},{},[2910],{"type":37,"value":2911},"O verdadeiro propósito de uma migração headless é melhorar a performance. Porém, um sistema headless mal implementado pode ser MAIS LENTO que um Shopify monolítico. Se usar Client-Side Rendering (CSR), o LCP pode chegar a 4+ segundos; a abordagem correta é Server-Side Rendering (SSR) ou Static Site Generation (SSG) + Incremental Static Regeneration (ISR).",{"type":32,"tag":33,"props":2913,"children":2914},{},[2915],{"type":37,"value":2916},"Exemplo de ISR em Next.js App Router para página de detalhes de produto:",{"type":32,"tag":52,"props":2918,"children":2922},{"className":2919,"code":2920,"language":2921,"meta":16,"style":16},"language-tsx shiki shiki-themes github-dark","\u002F\u002F app\u002Fproducts\u002F[slug]\u002Fpage.tsx\nexport const revalidate = 3600 \u002F\u002F Regenera a cada 1 hora\n\nexport async function generateStaticParams() {\n  const products = await getTopProducts(100) \u002F\u002F Pré-renderiza os 100 produtos principais\n  return products.map(p => ({ slug: p.slug }))\n}\n\nexport default async function ProductPage({ params }) {\n  const product = await getProduct(params.slug)\n  \n  return (\n    \u003Cdiv>\n      \u003Ch1>{product.title}\u003C\u002Fh1>\n      \u003CImage src={product.image} alt={product.title} priority \u002F>\n      \u003CAddToCartButton productId={product.id} \u002F>\n    \u003C\u002Fdiv>\n  )\n}\n","tsx",[2923],{"type":32,"tag":59,"props":2924,"children":2925},{"__ignoreMap":16},[2926,2933,2964,2971,2996,3039,3073,3080,3087,3123,3153,3160,3171,3189,3214,3264,3290,3306,3313],{"type":32,"tag":63,"props":2927,"children":2928},{"class":65,"line":66},[2929],{"type":32,"tag":63,"props":2930,"children":2931},{"style":70},[2932],{"type":37,"value":1446},{"type":32,"tag":63,"props":2934,"children":2935},{"class":65,"line":76},[2936,2940,2945,2950,2954,2959],{"type":32,"tag":63,"props":2937,"children":2938},{"style":109},[2939],{"type":37,"value":1454},{"type":32,"tag":63,"props":2941,"children":2942},{"style":109},[2943],{"type":37,"value":2944}," const",{"type":32,"tag":63,"props":2946,"children":2947},{"style":209},[2948],{"type":37,"value":2949}," revalidate",{"type":32,"tag":63,"props":2951,"children":2952},{"style":109},[2953],{"type":37,"value":217},{"type":32,"tag":63,"props":2955,"children":2956},{"style":209},[2957],{"type":37,"value":2958}," 3600",{"type":32,"tag":63,"props":2960,"children":2961},{"style":70},[2962],{"type":37,"value":2963}," \u002F\u002F Regenera a cada 1 hora\n",{"type":32,"tag":63,"props":2965,"children":2966},{"class":65,"line":120},[2967],{"type":32,"tag":63,"props":2968,"children":2969},{"emptyLinePlaceholder":161},[2970],{"type":37,"value":164},{"type":32,"tag":63,"props":2972,"children":2973},{"class":65,"line":148},[2974,2978,2982,2986,2991],{"type":32,"tag":63,"props":2975,"children":2976},{"style":109},[2977],{"type":37,"value":1454},{"type":32,"tag":63,"props":2979,"children":2980},{"style":109},[2981],{"type":37,"value":1975},{"type":32,"tag":63,"props":2983,"children":2984},{"style":109},[2985],{"type":37,"value":178},{"type":32,"tag":63,"props":2987,"children":2988},{"style":80},[2989],{"type":37,"value":2990}," generateStaticParams",{"type":32,"tag":63,"props":2992,"children":2993},{"style":86},[2994],{"type":37,"value":2995},"() {\n",{"type":32,"tag":63,"props":2997,"children":2998},{"class":65,"line":157},[2999,3003,3008,3012,3016,3021,3025,3030,3034],{"type":32,"tag":63,"props":3000,"children":3001},{"style":109},[3002],{"type":37,"value":206},{"type":32,"tag":63,"props":3004,"children":3005},{"style":209},[3006],{"type":37,"value":3007}," products",{"type":32,"tag":63,"props":3009,"children":3010},{"style":109},[3011],{"type":37,"value":217},{"type":32,"tag":63,"props":3013,"children":3014},{"style":109},[3015],{"type":37,"value":2046},{"type":32,"tag":63,"props":3017,"children":3018},{"style":80},[3019],{"type":37,"value":3020}," getTopProducts",{"type":32,"tag":63,"props":3022,"children":3023},{"style":86},[3024],{"type":37,"value":89},{"type":32,"tag":63,"props":3026,"children":3027},{"style":209},[3028],{"type":37,"value":3029},"100",{"type":32,"tag":63,"props":3031,"children":3032},{"style":86},[3033],{"type":37,"value":272},{"type":32,"tag":63,"props":3035,"children":3036},{"style":70},[3037],{"type":37,"value":3038},"\u002F\u002F Pré-renderiza os 100 produtos principais\n",{"type":32,"tag":63,"props":3040,"children":3041},{"class":65,"line":167},[3042,3046,3051,3056,3060,3064,3068],{"type":32,"tag":63,"props":3043,"children":3044},{"style":109},[3045],{"type":37,"value":769},{"type":32,"tag":63,"props":3047,"children":3048},{"style":86},[3049],{"type":37,"value":3050}," products.",{"type":32,"tag":63,"props":3052,"children":3053},{"style":80},[3054],{"type":37,"value":3055},"map",{"type":32,"tag":63,"props":3057,"children":3058},{"style":86},[3059],{"type":37,"value":89},{"type":32,"tag":63,"props":3061,"children":3062},{"style":103},[3063],{"type":37,"value":33},{"type":32,"tag":63,"props":3065,"children":3066},{"style":109},[3067],{"type":37,"value":112},{"type":32,"tag":63,"props":3069,"children":3070},{"style":86},[3071],{"type":37,"value":3072}," ({ slug: p.slug }))\n",{"type":32,"tag":63,"props":3074,"children":3075},{"class":65,"line":200},[3076],{"type":32,"tag":63,"props":3077,"children":3078},{"style":86},[3079],{"type":37,"value":551},{"type":32,"tag":63,"props":3081,"children":3082},{"class":65,"line":26},[3083],{"type":32,"tag":63,"props":3084,"children":3085},{"emptyLinePlaceholder":161},[3086],{"type":37,"value":164},{"type":32,"tag":63,"props":3088,"children":3089},{"class":65,"line":295},[3090,3094,3098,3102,3106,3110,3114,3119],{"type":32,"tag":63,"props":3091,"children":3092},{"style":109},[3093],{"type":37,"value":1454},{"type":32,"tag":63,"props":3095,"children":3096},{"style":109},[3097],{"type":37,"value":1459},{"type":32,"tag":63,"props":3099,"children":3100},{"style":109},[3101],{"type":37,"value":1975},{"type":32,"tag":63,"props":3103,"children":3104},{"style":109},[3105],{"type":37,"value":178},{"type":32,"tag":63,"props":3107,"children":3108},{"style":80},[3109],{"type":37,"value":1468},{"type":32,"tag":63,"props":3111,"children":3112},{"style":86},[3113],{"type":37,"value":1473},{"type":32,"tag":63,"props":3115,"children":3116},{"style":103},[3117],{"type":37,"value":3118},"params",{"type":32,"tag":63,"props":3120,"children":3121},{"style":86},[3122],{"type":37,"value":1483},{"type":32,"tag":63,"props":3124,"children":3125},{"class":65,"line":322},[3126,3130,3135,3139,3143,3148],{"type":32,"tag":63,"props":3127,"children":3128},{"style":109},[3129],{"type":37,"value":206},{"type":32,"tag":63,"props":3131,"children":3132},{"style":209},[3133],{"type":37,"value":3134}," product",{"type":32,"tag":63,"props":3136,"children":3137},{"style":109},[3138],{"type":37,"value":217},{"type":32,"tag":63,"props":3140,"children":3141},{"style":109},[3142],{"type":37,"value":2046},{"type":32,"tag":63,"props":3144,"children":3145},{"style":80},[3146],{"type":37,"value":3147}," getProduct",{"type":32,"tag":63,"props":3149,"children":3150},{"style":86},[3151],{"type":37,"value":3152},"(params.slug)\n",{"type":32,"tag":63,"props":3154,"children":3155},{"class":65,"line":331},[3156],{"type":32,"tag":63,"props":3157,"children":3158},{"style":86},[3159],{"type":37,"value":328},{"type":32,"tag":63,"props":3161,"children":3162},{"class":65,"line":387},[3163,3167],{"type":32,"tag":63,"props":3164,"children":3165},{"style":109},[3166],{"type":37,"value":769},{"type":32,"tag":63,"props":3168,"children":3169},{"style":86},[3170],{"type":37,"value":1715},{"type":32,"tag":63,"props":3172,"children":3173},{"class":65,"line":395},[3174,3179,3184],{"type":32,"tag":63,"props":3175,"children":3176},{"style":86},[3177],{"type":37,"value":3178},"    \u003C",{"type":32,"tag":63,"props":3180,"children":3181},{"style":857},[3182],{"type":37,"value":3183},"div",{"type":32,"tag":63,"props":3185,"children":3186},{"style":86},[3187],{"type":37,"value":3188},">\n",{"type":32,"tag":63,"props":3190,"children":3191},{"class":65,"line":438},[3192,3196,3201,3206,3210],{"type":32,"tag":63,"props":3193,"children":3194},{"style":86},[3195],{"type":37,"value":1731},{"type":32,"tag":63,"props":3197,"children":3198},{"style":857},[3199],{"type":37,"value":3200},"h1",{"type":32,"tag":63,"props":3202,"children":3203},{"style":86},[3204],{"type":37,"value":3205},">{product.title}\u003C\u002F",{"type":32,"tag":63,"props":3207,"children":3208},{"style":857},[3209],{"type":37,"value":3200},{"type":32,"tag":63,"props":3211,"children":3212},{"style":86},[3213],{"type":37,"value":3188},{"type":32,"tag":63,"props":3215,"children":3216},{"class":65,"line":447},[3217,3221,3226,3231,3235,3240,3245,3249,3254,3259],{"type":32,"tag":63,"props":3218,"children":3219},{"style":86},[3220],{"type":37,"value":1731},{"type":32,"tag":63,"props":3222,"children":3223},{"style":209},[3224],{"type":37,"value":3225},"Image",{"type":32,"tag":63,"props":3227,"children":3228},{"style":80},[3229],{"type":37,"value":3230}," src",{"type":32,"tag":63,"props":3232,"children":3233},{"style":109},[3234],{"type":37,"value":605},{"type":32,"tag":63,"props":3236,"children":3237},{"style":86},[3238],{"type":37,"value":3239},"{product.image} ",{"type":32,"tag":63,"props":3241,"children":3242},{"style":80},[3243],{"type":37,"value":3244},"alt",{"type":32,"tag":63,"props":3246,"children":3247},{"style":109},[3248],{"type":37,"value":605},{"type":32,"tag":63,"props":3250,"children":3251},{"style":86},[3252],{"type":37,"value":3253},"{product.title} ",{"type":32,"tag":63,"props":3255,"children":3256},{"style":80},[3257],{"type":37,"value":3258},"priority",{"type":32,"tag":63,"props":3260,"children":3261},{"style":86},[3262],{"type":37,"value":3263}," \u002F>\n",{"type":32,"tag":63,"props":3265,"children":3266},{"class":65,"line":480},[3267,3271,3276,3281,3285],{"type":32,"tag":63,"props":3268,"children":3269},{"style":86},[3270],{"type":37,"value":1731},{"type":32,"tag":63,"props":3272,"children":3273},{"style":209},[3274],{"type":37,"value":3275},"AddToCartButton",{"type":32,"tag":63,"props":3277,"children":3278},{"style":80},[3279],{"type":37,"value":3280}," productId",{"type":32,"tag":63,"props":3282,"children":3283},{"style":109},[3284],{"type":37,"value":605},{"type":32,"tag":63,"props":3286,"children":3287},{"style":86},[3288],{"type":37,"value":3289},"{product.id} \u002F>\n",{"type":32,"tag":63,"props":3291,"children":3292},{"class":65,"line":498},[3293,3298,3302],{"type":32,"tag":63,"props":3294,"children":3295},{"style":86},[3296],{"type":37,"value":3297},"    \u003C\u002F",{"type":32,"tag":63,"props":3299,"children":3300},{"style":857},[3301],{"type":37,"value":3183},{"type":32,"tag":63,"props":3303,"children":3304},{"style":86},[3305],{"type":37,"value":3188},{"type":32,"tag":63,"props":3307,"children":3308},{"class":65,"line":507},[3309],{"type":32,"tag":63,"props":3310,"children":3311},{"style":86},[3312],{"type":37,"value":1831},{"type":32,"tag":63,"props":3314,"children":3315},{"class":65,"line":536},[3316],{"type":32,"tag":63,"props":3317,"children":3318},{"style":86},[3319],{"type":37,"value":551},{"type":32,"tag":33,"props":3321,"children":3322},{},[3323],{"type":37,"value":3324},"Dessa forma, os 100 produtos principais são gerados no build time e o restante é renderizado on-demand na primeira requisição, cacheado por 1 hora. O LCP cai para 1.2s porque o HTML já está pronto — apenas o carregamento de imagens permanece.",{"type":32,"tag":33,"props":3326,"children":3327},{},[3328],{"type":37,"value":3329},"Meça também o custo de runtime: invocações de função serverless × tempo de execução × pricing. Na Vercel, se uma página SSR típica leva 50ms de execução e você tem 100.000 pageviews diários: 100k × 50ms = 5 milhões de GB-s, equivalente a $25\u002Fdia (pricing do Vercel Pro). Para reduzir:",{"type":32,"tag":3331,"props":3332,"children":3333},"ol",{},[3334,3346,3351],{"type":32,"tag":3335,"props":3336,"children":3337},"li",{},[3338,3340],{"type":37,"value":3339},"Edge caching — Ative cache de CDN no Cloudflare com ",{"type":32,"tag":59,"props":3341,"children":3343},{"className":3342},[],[3344],{"type":37,"value":3345},"Cache-Control: s-maxage=3600",{"type":32,"tag":3335,"props":3347,"children":3348},{},[3349],{"type":37,"value":3350},"Hydration parcial — Use Astro ou Qwik, hidrate apenas componentes interativos",{"type":32,"tag":3335,"props":3352,"children":3353},{},[3354,3356,3362],{"type":37,"value":3355},"Otimização de query de BD — Eliminate problemas N+1 com ",{"type":32,"tag":59,"props":3357,"children":3359},{"className":3358},[],[3360],{"type":37,"value":3361},"include",{"type":37,"value":3363}," no Prisma, reduza 10 queries para 1",{"type":32,"tag":1025,"props":3365,"children":3366},{},[3367,3392],{"type":32,"tag":1029,"props":3368,"children":3369},{},[3370],{"type":32,"tag":1033,"props":3371,"children":3372},{},[3373,3378,3382,3387],{"type":32,"tag":1037,"props":3374,"children":3375},{},[3376],{"type":37,"value":3377},"Métrica",{"type":32,"tag":1037,"props":3379,"children":3380},{},[3381],{"type":37,"value":1041},{"type":32,"tag":1037,"props":3383,"children":3384},{},[3385],{"type":37,"value":3386},"Novo (Next.js SSR)",{"type":32,"tag":1037,"props":3388,"children":3389},{},[3390],{"type":37,"value":3391},"Meta",{"type":32,"tag":1053,"props":3393,"children":3394},{},[3395,3418,3441,3464,3487],{"type":32,"tag":1033,"props":3396,"children":3397},{},[3398,3403,3408,3413],{"type":32,"tag":1060,"props":3399,"children":3400},{},[3401],{"type":37,"value":3402},"LCP",{"type":32,"tag":1060,"props":3404,"children":3405},{},[3406],{"type":37,"value":3407},"2.3s",{"type":32,"tag":1060,"props":3409,"children":3410},{},[3411],{"type":37,"value":3412},"1.8s",{"type":32,"tag":1060,"props":3414,"children":3415},{},[3416],{"type":37,"value":3417},"\u003C2.5s",{"type":32,"tag":1033,"props":3419,"children":3420},{},[3421,3426,3431,3436],{"type":32,"tag":1060,"props":3422,"children":3423},{},[3424],{"type":37,"value":3425},"TBT",{"type":32,"tag":1060,"props":3427,"children":3428},{},[3429],{"type":37,"value":3430},"190ms",{"type":32,"tag":1060,"props":3432,"children":3433},{},[3434],{"type":37,"value":3435},"120ms",{"type":32,"tag":1060,"props":3437,"children":3438},{},[3439],{"type":37,"value":3440},"\u003C200ms",{"type":32,"tag":1033,"props":3442,"children":3443},{},[3444,3449,3454,3459],{"type":32,"tag":1060,"props":3445,"children":3446},{},[3447],{"type":37,"value":3448},"CLS",{"type":32,"tag":1060,"props":3450,"children":3451},{},[3452],{"type":37,"value":3453},"0.08",{"type":32,"tag":1060,"props":3455,"children":3456},{},[3457],{"type":37,"value":3458},"0.02",{"type":32,"tag":1060,"props":3460,"children":3461},{},[3462],{"type":37,"value":3463},"\u003C0.1",{"type":32,"tag":1033,"props":3465,"children":3466},{},[3467,3472,3477,3482],{"type":32,"tag":1060,"props":3468,"children":3469},{},[3470],{"type":37,"value":3471},"Tempo de resposta do servidor",{"type":32,"tag":1060,"props":3473,"children":3474},{},[3475],{"type":37,"value":3476},"420ms",{"type":32,"tag":1060,"props":3478,"children":3479},{},[3480],{"type":37,"value":3481},"180ms",{"type":32,"tag":1060,"props":3483,"children":3484},{},[3485],{"type":37,"value":3486},"\u003C300ms",{"type":32,"tag":1033,"props":3488,"children":3489},{},[3490,3495,3500,3505],{"type":32,"tag":1060,"props":3491,"children":3492},{},[3493],{"type":37,"value":3494},"Custo de runtime mensal",{"type":32,"tag":1060,"props":3496,"children":3497},{},[3498],{"type":37,"value":3499},"$0 (incluído)",{"type":32,"tag":1060,"props":3501,"children":3502},{},[3503],{"type":37,"value":3504},"$750 (Vercel Pro)",{"type":32,"tag":1060,"props":3506,"children":3507},{},[3508],{"type":37,"value":3509},"\u003C$1000",{"type":32,"tag":40,"props":3511,"children":3513},{"id":3512},"estratégia-de-rollback-e-período-de-dual-run",[3514],{"type":37,"value":3515},"Estratégia de Rollback e Período de Dual-Run",{"type":32,"tag":33,"props":3517,"children":3518},{},[3519],{"type":37,"value":3520},"A etapa final da migração é o período de dual-run: ambos os sistemas rodam em paralelo por 30 dias enquanto o tráfego é deslocado gradualmente via canary deployment. Durante esse período, execute um \"shadow mode\" — o sistema headless processa cada requisição em background sem impactar o usu",{"type":32,"tag":3522,"props":3523,"children":3524},"style",{},[3525],{"type":37,"value":3526},"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":120,"depth":120,"links":3528},[3529,3532,3535,3538,3539],{"id":42,"depth":76,"text":45,"children":3530},[3531],{"id":821,"depth":120,"text":824},{"id":1010,"depth":76,"text":1013,"children":3533},[3534],{"id":1846,"depth":120,"text":1849},{"id":1884,"depth":76,"text":1887,"children":3536},[3537],{"id":2892,"depth":120,"text":2895},{"id":2903,"depth":76,"text":2906},{"id":3512,"depth":76,"text":3515},"markdown","content:ru:tech:migracao-ecommerce-headless-roadmap-gestao-risco.md","content","ru\u002Ftech\u002Fmigracao-ecommerce-headless-roadmap-gestao-risco.md","ru\u002Ftech\u002Fmigracao-ecommerce-headless-roadmap-gestao-risco","md",1783289081536]