GTM on Shopify Plus store now Reporting CSP issues

New Member
1 0 0

I've been scouring the forums for an answer to this, but I've come up empty so far. Before the last update Shopify update 2-20-20, I had a Shopify Plus store with a script in the additional GA tags sections (Online Store > Preferences > Additional Google Analytics Javascript).Screen Shot 2020-02-24 at 14.59.15.png





It had and still has the standard GTM snippet which worked without CSP error before the update, and I never saw an error when I previewed the theme with the new Shopify update two weeks ago. Now, I'm getting multiple CSP Errors reported in the Dev Console for scripts that are being imported through my Tag Manager snippet, and I can't figure out how to make them fire correctly.


As far as I can tell, the Tag Manager snippet is correct. The preview from GTM shows up in the checkout and debugging lists all fired events in the console. As I understood the update, nothing should have changed how these 3rd party analytics scripts were fired. I tried to move the GTM snippet to checkout.liquid but nothing changed. Is there a way that I can explicitly add the 3rd Party analytics domains to the CSP? Do I even have access to that?




Please note that Shopify's new CSP directive that is blocking the scripts you're referring to is on "report" mode.


In this mode the browser is allowed to load and execute the scripts, but must report back about them.


So nothing should be broken or changed in your checkout GTM implementation.