Liquid, JavaScript, themes, sales channels
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.
User | RANK |
---|---|
38 | |
29 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023