TL;DR: Focus on perfecting your UA setup before spending time on GA4.
Google Analytics 4 (GA4) is out. It's the new and default version of Google Analytics. The old one, called Universal Analytics (UA), will be sunset on July 1, 2023.
But GA4 is still a work in progress with a lot missing. Google recommends running a parallel setup with both GA4 and UA. That way, you still get all the analytics and reports available in UA. But you also populate GA4 with actual data, so you're not starting from scratch when GA4 is ready.
In theory, I agree with Google on setting up a parallel setup. It's the right thing to do long-term. But setting up GA4 isn't easy in practice as Shopify doesn't support it yet. You need to use Google Tag Manager and insert a lot of code. And you also need third-party apps to do server-side tracking if you want all available data. Finally, with GA4, you can’t segment your Google Optimize A/B tests based on the variant. So you can’t see how your different variants performed across different segments, e.g. across devices types.
So my recommendation is to focus on perfecting your UA setup for now. Then start focusing on GA4 when it integrates natively with Shopify, so you can get all the right data.
javascript ga("require", "linkid"); ga("require", "ec"); var ShopifyCheckoutstep = Shopify.Checkout.step; switch (ShopifyCheckoutstep) { case "contact_information": ga("ec:setAction", "checkout", { "step": 1, "option": "contact_information" }); ga('send', 'event', 'checkout', 'contact information', { nonInteraction: true }); break; case "shipping_method": ga("ec:setAction", "checkout", { "step": 2, "option": "shipping_method" }); ga('send', 'event', 'checkout', 'shipping method', { nonInteraction: true }); break; case "payment_method": ga("ec:setAction", "checkout", { "step": 3, "option": "payment_method" }); ga('send', 'event', 'checkout', 'payment method', { nonInteraction: true }); case "processing": ga("ec:setAction", "checkout", { "step": 4, "option": "processing" }); ga('send', 'event', 'checkout', 'processing', { nonInteraction: true }); };
Enabling the Demographics and Interest Reports gives your more demographic data about your audience. Think age, gender, and interest when possible.
Enabling Enhanced Link Attribution lets you better track link clicks on your site. Without it, GA will not differentiate between links, on the page, pointing to the same URL. But with it, it's easy to analyse, e.g., above the fold vs the rest of the page and buttons. Enhanced Link Attribution also enables the In-Page Analytics report, which you access via the Page Analytics Chrome plugin.
Google Analytics Admin -> Property Settings -> Enabled Enable Demographics and Interest Reports.
Google Analytics Admin -> Property Settings -> Enabled Use enhanced link attribution