Setup GA4 in Shopify in 3 Easy Steps

Shopify doesn’t support GA4 yet – but that doesn’t mean you should wait to get it added!

Universal Google Analytics (UA) will stop collecting in July 2023. So it’s super important to get the new version of Google Analytics (GA4) set up now.

This way, you can start building historical and year over year data that you can currently have access to in Universal Analytics.

I’ll take you through the steps to install GA4 on Shopify below. Hit me up with any questions.

Note: This process will not set up advanced ecommerce tracking, like ‘add to cart’ and product views and your checkout funnel. But, it will get you the basics – tracking marketing channels, users/sessions and sales.

Step 1: Create a GA4 Property

Log into Google Analytics and select Create Property:


Add ‘GA4 – Your Shop Name‘ in the Property Name field and click Next, then click Create:


Select Web as the platform:


Enter your website and Stream Name (use your shop name):


Click View tag instructions:


Select the tab that says Install Manually, then select the copy button to copy the GA4 tracking code:


Step 2: Add GA4 Tracking to Shopify

With the GA4 code copied, head over to your Shopify admin. Then go to Preferences (under Online Store), scroll down the page and under the Google Analytics account field there will be a link to add additional Google Analyitcs JavaScript.

Paste the GA code into this field.

If there is code there already, paste it at the top above all the other code.

shopify ga4 install


Step 3: Add GA4 Sales Tracking to Shopify

The code you just added will start tracking traffic in GA4, but not sales. To track sales copy the code below:

Then in Shopify go to Settings > Checkout and accounts and paste in the Additional Scripts field. Be sure to change the GA4 Measurement ID where it says G-CHANGEME to your own measurement ID.


To find your Measuerment ID, go to Google Analtyics under Properties in the admin section go to Data Streams. Click on the data stream you set up earlier, and copy your Measurement ID. This is waht gets pasted into G-CHANGEME:


Watch your traffic flowing in GA4 in Real Time

Now that you have the code set up in Shopify, GA4 will start tracking data.

GA4 is about 24 hours behind in showing data in the reprots.

However, you can use the Realtime reporting to verify your traffic is coming in. Go into your GA4 property and under Reports select Realtime:


That’s it – you should start to see traffic and sales coming into your GA4 reproting within 24 hours.