Hello,
I tried to setup Partytown on a BuilderIO-NextJS project. It was a partial success up to the point that I am facing CORS errors coming from the library. I tried several approaches and followed the documentation guide of installation and setup of Partytown but no success so far with the CORS issues. Can you please assist with this.
My setup is as follows:
Installed the packages and added the scripts in package.json to relocate the partytown resources to the public folder:
enabled the experimental nexrScriptWorkers in the next.config file:
invoked the Partytown component and added the gtm script with type text/partytown in the app.tsx file with some console.logs to try the proxying mechanism but is seems like it does not work for some reason (the logs are not present in the console yet the requests from partytown to external resources are made):
Another approach which was taken was to initialize and setup partytown in the document.tsx file using this approach:
Again unfortunately there was no success in battling these CORS errors: