• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


27 Apr, 2025

Updated at 20 May, 2025

Using Partytown to offload GTM: CORS errors with Google Analytics and Facebook Pixel

I recently tried implementing Partytown to offload Google Tag Manager (GTM) to a web worker. GTM itself loads successfully via Partytown. However, the tags managed by GTM — specifically Google Analytics and Facebook Pixel — are throwing CORS errors when they attempt to fire network requests.

I am using Next 12 with React 17 ( Node v18 ) and installed Partytown using npm install @builder.io/partytown. Loaded the GTM script using . GTM loads successfully via the worker, however, tags inside GTM (like Google Analytics and Facebook Pixel) throw CORS errors when they try to send network requests.

Is additional configuration required to allow scripts loaded inside GTM (like GA, Facebook Pixel) to work with Partytown? How can I fix or work around the CORS issues triggered by these third-party tags?