Universal Analytics? Google Analytics 4? Both?

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.

How to set up Universal Analytics with Shopify

Step 1: Create a Google Analytics account with a Universal Analytics property.

Step 2: Set up Universal Analytics via Shopify

  1. Find your UA tracking code in GA: Admin -> Tracking info in the property column -> Tracking Code. Copy the Global Site Tag (gtag.js) script.
  2. Paste the code into Shopify: Admin -> Online Store -> Preferences -> Google Analytics Account.
  3. Enable Enhanced Ecommerce. Tick the checkbox below the script field where you inserted your tracking code.

Step 3: Fix the Checkout Behaviour Report

Step 4: Enable Demographics and Interest Reports and Enhanced Link Attribution

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