Skip to content
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

Explain Google Tag Manager issue #99

Open
Maxim-Mazurok opened this issue Nov 5, 2024 · 0 comments
Open

Explain Google Tag Manager issue #99

Maxim-Mazurok opened this issue Nov 5, 2024 · 0 comments

Comments

@Maxim-Mazurok
Copy link
Contributor

Maxim-Mazurok commented Nov 5, 2024

I was getting this from users:

{
  "blocked-uri": "https://www.googletagmanager.com/gtag/js?id=G-EVQQLXSL5E",
  "disposition": "enforce",
  "document-uri": "https://app.borderwise.com/sw.js",
  "effective-directive": "connect-src",
  "violated-directive": "connect-src",
  "original-policy": "default-src  'self'; frame-ancestors  'self'; style-src   'self' 'unsafe-inline' https://fonts.googleapis.com 'unsafe-inline'; script-src-elem  'self' https://*.googletagmanager.com https://*.hotjar.com; style-src-elem  'self' 'unsafe-inline' https://fonts.googleapis.com; font-src  'self' https://fonts.gstatic.com https://fonts.gstatic.cn; connect-src  'self' https://localhost:33443 https://localhost:43443 https://*.ingest.sentry.io https://*.hotjar.com https://*.hotjar.io wss://*.hotjar.com https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com  'self' https://fonts.gstatic.com https://fonts.gstatic.cn  'self' https://*.google-analytics.com https://*.googletagmanager.com  'self' 'unsafe-inline' https://fonts.googleapis.com; img-src  'self' https://*.google-analytics.com https://*.googletagmanager.com; report-uri  /api/v1/reports/csp-report;",
  "status-code": "0",
  "referrer": "",
  "script-sample": ""
}

Basically, it's blocking GTM even thought it's clearly allowed.

I assumed it was due to some ads/privacy plugins, but couldn't reproduce, because in my Chrome, Ublock Origin would use 307 internal redirect, see https://stackoverflow.com/a/27948729/4536543 like so:
image

However when I got the same error from one of our devs, we looked more into it, he was getting stable repro in his Chrome with same plugin with same settings. I tried same plugin with same settings in Chromium (as opposed to Chrome) and it reproduced.

I don't know what A/B experiment my Chrome was part of, but yeah, now it's solved.

Reporting this in the issue for now, will create PR to close this issue when I get a chance. Hope this helps someone, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant