Every tutorial here is 100% free — and always will be.

How to Add Google Analytics to Shopify

Connect Google Analytics 4 to your Shopify store using the official channel so ecommerce events track properly.

6 min readBeginnerChecked 16 August 2026
Beginner friendly

Google Analytics 4 tells you where visitors come from and what they do. Shopify now connects to GA4 through the Google and YouTube channel, which is more reliable than pasting code into your theme.

1

Create a GA4 property

In Google Analytics create a property for your store, then create a web data stream using your storefront domain. Copy the measurement ID, which starts with G-.

2

Install the Google and YouTube channel

In your Shopify admin open the Shopify App Store and install Google and YouTube, then connect your Google account.

3

Connect your GA4 property

In the channel settings, choose Google Analytics and select the GA4 property and data stream you created.

4

Confirm customer privacy settings

Go to Settings, then Customer privacy, and configure your cookie banner and data collection region rules so consent is respected.

5

Verify tracking

Open GA4 Realtime, visit your store in another browser, and confirm the pageview appears. Then add to cart and confirm the event fires.

Note

Avoid installing GA4 twice, for example through the channel and a theme snippet. Duplicate tags double-count sessions and purchases.

Still stuck? Skip the tutorials.

You've given it a go. If you'd rather have someone sort it out for you, tell us what you need and we'll take it from there.

Get Help With My Shopify Store

Expert help provided by PromptSites.com.

Related tutorials

Read more elsewhere

Shopify Help CenterOfficial

Shopify Help Center: Analytics and reports

Explains what each Shopify report measures and how sessions, conversion rate and attribution are calculated.

Official documentation
Intermediate27 July 2026

Link to an external site. We don't republish other people's content.

Website made, maintained and hosted by PromptSites.com

PromptSites logo