-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐞] CORS error for Google Tag Manager Service Worker #635
Comments
Having the same issue. |
Indeed, when gtm.js tries to create this iframe, Partytown seems to be proxying this behavior and doing something else (perhaps requesting the iframe src) instead. Since, this src matches Even if Google were to return cors headers for |
It's also not clear if |
@jrood |
Ok yes, |
@jrood @brandonfredericksen @tcp2 |
Same issue, I see websites and articles recommending Partytown to load GTM but I get this error. |
try to implement reverse proxy |
Same problem here. I can confirm the error still occurs while using a reverse proxy connected to https://www.googletagmanager.com/gtm.js?id= or https://www.googletagmanager.com/gtag/js?id= |
please produce a minimum reproducible example |
Describe the bug
I'm getting the following CORS error when using Partytown and Google Tag Manager.
Access to XMLHttpRequest at 'https://www.googletagmanager.com/static/service_worker/4al0/sw_iframe.html?origin=https%3A%2F%2Fwww.url.com' from origin 'https://www.url.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Error happens in production as well.
Current implementation:
I'm using Remix. I've tried adding the url to the
loadScriptsOnMainThread
without success:Reproduction
private
Steps to reproduce
Use Partytown with Google Tag Manager
Browser Info
Chrome
Additional Information
No response
The text was updated successfully, but these errors were encountered: