Quick answer. The official, no-code way to add GA4 to Shopify is the Google and YouTube sales-channel app. Install it, connect your Google account, choose or create your GA4 property, confirm the web data stream, and click Connect. Shopify then inserts the tag and automatically sends ecommerce events like product views, add-to-cart, and purchases. One catch: GA4 won't record anything until you remove password protection from your store.
One app, no code, automatic ecommerce tracking. Just remember to take the password off.
What you'll need
- A Shopify store with admin access.
- A Google account, and a GA4 property (or let the app create one).
Add GA4 to Shopify
- Install the app. In Shopify admin, open the Shopify App Store and search Google and YouTube. Install it and approve the permissions.
- Start GA4 setup. In the app, find the Google Analytics 4 setup and click Get started.
- Connect Google. Connect your Google account.
- Choose your property. Choose your GA4 property from the dropdown, or create a new one.
- Confirm and connect. Confirm the correct web data stream, then click Connect.
- Remove password protection. Go to Online Store, Preferences and remove your store password so GA4 can collect data.
Do it with AI
Want to add a custom event beyond the automatic ones?
Add a custom event to my Shopify theme
My Shopify store has GA4 connected via the Google & YouTube app, which already tracks standard ecommerce events. I want to track one extra custom event: [describe it, e.g. newsletter signup]. Show me how to add it as a Custom Pixel in Settings, Customer events, with the gtag code, and how to verify in DebugView.
How to check it worked
With the store password removed, open GA4 Realtime and browse your storefront. You should see yourself, plus ecommerce events firing as you view products and add to cart.
Common mistakes
- Store password still on. GA4 records nothing until you remove it. This is the number-one cause on Shopify.
- Double-tagging. Adding the app AND pasting a gtag snippet into theme.liquid double-counts everything.
- Expecting custom events automatically. Standard ecommerce events are automatic, anything custom you add yourself.
FAQ
- What's the easiest way to add GA4 to Shopify?
- The official Google and YouTube sales-channel app. It connects GA4 with no code and auto-tracks ecommerce events.
- Why is GA4 not tracking my Shopify store?
- Most often because password protection is still on. GA4 can't collect data until you remove it under Online Store, Preferences.
- Does GA4 track sales automatically on Shopify?
- Yes. Once connected via the app, standard ecommerce events including purchases are sent automatically.
Connected.
Holy Bucket reads your store's GA4 and tells you which pages leak buyers and where the drop-off is, in plain English.