Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Google Analytics 4 events (begin_checkout & add_payment_info) are being blocked on Shopify's checkout pages due to poorly configured Content Security Policy (CSP) Headers.
Here's Google's documentation on which CSP Headers need to be set for GA4 to work:
https://developers.google.com/tag-platform/tag-manager/web/csp#google_analytics_4_google_analytics
Shopify has not implemented
https://*.analytics.google.com
And probably others and this is causing GA4 code to be blocked by browsers.
How to test? Check your GA4 events for begin_checkout and add_payment_info events and you'll probably have few if any.
So this is happening to me. What do I do about it?
Where does this have to be implemented? I can't see any CSP headers in our shopify theme. Adding one manually breaks our site.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025