Content Security Policy violation when importing Google Analytics

I followed the docs on Google Analytics and took a look at with-google-analytics example. I'm getting the following error when running production build of my extension:
Refused to load the script 'chrome-extension://www.googletagmanager.com/gtag/js?id=XXXXXXX&l=dataLayer&cx=c' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Reproduction:
  • Follow with-google-analytics example
  • pnpm plasmo build
  • Load unpacked in Chrome (the production build)
  • Profit
Was there something I missed here?
Was this page helpful?