Google Analytics is blocked by CSP policy


I try to set up Google Analytics but no luck.
Here is what I did:

  • ga universal tracking code: My analytics ID
  • ga universal domain name: (without www)
  • content security policy script src: I added “

But I still don’t receive any hits. When I check with GTmetric then the google analytics js is blocked

Am I missing something?

1 Like

It’s blocked for me too on all websites thanks to Firefox’s content blocking. Are you using Firefox? Or some plugin that blocks ads and tracking?


It works for me now.

My solusion is UNCHECK the content security policy. This one is enable by default. Maybe some expert advice here?

The first piece of advice would be don’t disable CSP.

The security of your site is vastly more important than cutting corners implementing analytics correctly.


Google’s article for tag manager suggests you might need to add for Analytics.


If I enable CSP and add this one, then still doesn’t work.