·4 min read

Install Google Analytics 4 on Shopify: complete 2026 guide

Connect GA4 to Shopify in 2026: native method, Shopify pixel and tracking verification. No code required for basic tracking.

install google analytics 4 shopifygoogle analytics shopifyga4 shopify installshopify google analytics 4

By Matheo Zimmer

Shopify has integrated Google Analytics 4 natively since 2023. The install takes less than 10 minutes and doesn't require touching the theme code. Here's how to proceed and how to verify the tracking works correctly.


Before you start

You need:

  • Owner access or staff with "Online Store" permissions
  • A GA4 property created with its Measurement ID (G-XXXXXXXXXX)

If you haven't created your GA4 property yet, start with the general GA4 install guide.


Official method: Google & YouTube Channel in Shopify

This is the method recommended by Shopify and Google. It connects GA4 via the Google sales channel.

Step 1: install the Google & YouTube channel

  1. In Shopify admin → Sales channels → +
  2. Search "Google & YouTube"
  3. Add channel

If the channel is already installed (it is on most stores), skip straight to step 2.

Step 2: connect GA4

  1. In Shopify → Google & YouTube → Settings
  2. "Google Analytics" section
  3. Click "Connect Google Analytics"
  4. Select your Google account → your GA4 property
  5. Validate

Shopify automatically injects the GA4 tag on every store page, including the checkout funnel.

Step 3: enable enhanced e-commerce data

  1. In Shopify admin → Google & YouTube → Settings
  2. Enable "Share data with Google Analytics"
  3. Select the sharing level: "Google Analytics and Google products" (recommended)

Shopify then automatically sends the standard e-commerce events: view_item, add_to_cart, begin_checkout, purchase.


Alternative method: Shopify Pixel with the GA4 ID

If the Google channel method doesn't work or if you want more control:

  1. Shopify admin → Settings → Customer events
  2. Add pixel
  3. Select "Add custom code"
  4. Paste this code replacing G-XXXXXXXXXX with your GA4 ID:
analytics.subscribe("page_viewed", () => {
  gtag("config", "G-XXXXXXXXXX");
});
  1. Enable the pixel

This method is more technical but gives full control over the events sent to GA4.


Verify that tracking works

Quick real-time test

  1. Open your Shopify store in a private window
  2. Navigate through a few pages (home, a product page, the cart)
  3. In GA4 → Reports → Realtime
  4. You should see yourself as an active visitor

Verify e-commerce events

  1. Add a product to the cart (or start a checkout)
  2. In GA4 → Realtime → "Key events" section
  3. You should see add_to_cart or begin_checkout appear

If the events appear, e-commerce tracking is correctly configured.


Common issues with Shopify + GA4

Checkout isn't tracked

Shopify requires your plan to include checkout customisation to track conversions properly. On Basic plans, the checkout funnel is limited. If you see GA4 sessions but zero purchase events, it's probably tied to Shopify permissions.

GA4 Monetisation data stays at zero

Verify the "Share data with Google Analytics" option is enabled in the Google & YouTube channel. Without it, Shopify sends events but no monetary values.

Gap between Shopify orders and GA4

That's normal. GA4 has a 24 to 48-hour processing delay. Today's data is never complete. For real time, use Shopify's built-in reports.


Difference with the GA4 e-commerce guide

This article covers the GA4 tag install on Shopify. If your tag is in place and you now want to analyse e-commerce performance (revenue by channel, purchase funnel, top products), see:

GA4 e-commerce: Shopify and WooCommerce tracking: how to read and exploit the data once tracking is in place.


After the install

  1. Change data retention to 50 months in GA4 → Admin → Data retention
  2. Mark the purchase event as a conversion in GA4 → Admin → Conversions
  3. GDPR / Consent setup: see GA4 and GDPR cookies consent

If you manage GA4 for multiple Shopify stores, NarratIQ centralises their properties in a single dashboard and generates the monthly PDF report in 30 seconds per client.


Install guides on other platforms

Frequently asked questions

Yes in 90% of cases. It's the official Google install, which automatically configures enhanced ecommerce (view_item, add_to_cart, purchase). Time saved: 2-3h. Limitations: no advanced tracking (detailed begin_checkout, add_payment_info). For more, complement with GTM in parallel.

Ready to automate your GA4 reports?

Connect your Google Analytics 4 in 5 minutes. 14-day free trial, no credit card.

Try NarratIQ free