-
Notifications
You must be signed in to change notification settings - Fork 438
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, |
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: