Shopify GA4 setup in 2026: native app vs Google Tag Manager vs tracking apps

The three ways to set up GA4 on Shopify today, how each works with Customer events, and which one to choose.

There are three ways to set up GA4 on a Shopify store today: Shopify’s Google & YouTube app, Google Tag Manager through a custom pixel, or a tracking app. Since Shopify moved checkout tracking to Customer events, some older tutorials no longer work. Here is how each method works now, and how to choose.

Method 1: the Google & YouTube app

Shopify’s own app connects your store to GA4 and Google Ads.

  1. Install the Google & YouTube app and connect your Google account.
  2. Select your GA4 property in the app’s settings.
  3. Place a test order and check the events in GA4’s DebugView or Realtime report.

Google has also been rolling out a server-to-server connection for stores using the app, which sends purchases from Shopify’s servers to GA4 and Google Ads. It can be switched off in the app’s settings, and it must be if another tool already sends purchases to GA4. I compare the app with a custom setup in Google & YouTube app vs server-side GTM.

Pros: free, quick, standard ecommerce events, works with Shopify’s consent settings. Cons: you can’t add custom events or parameters, debugging is limited, and you can’t easily combine it with other tags without creating duplicates.

Method 2: Google Tag Manager in a custom pixel

This is the method I use for most stores, because it gives full control and feeds every platform from one data layer.

  1. Create a GTM web container, and a server container if you plan to go server-side.
  2. In Shopify, go to Settings → Customer events → Add custom pixel, and load GTM inside the pixel.
  3. Subscribe to Shopify’s standard events and push them to the data layer in GA4’s ecommerce format.
  4. In GTM, create the GA4 tags and triggers for each event.
  5. Set the pixel’s permissions so it follows the visitor’s consent.

Here is a simplified example for the purchase:

analytics.subscribe("checkout_completed", (event) => {
  const c = event.data.checkout;
  window.dataLayer.push({ ecommerce: null });
  window.dataLayer.push({
    event: "purchase",
    ecommerce: {
      transaction_id: c.order?.id,
      value: c.totalPrice?.amount,
      currency: c.currencyCode,
      tax: c.totalTax?.amount,
      shipping: c.shippingLine?.price?.amount,
      items: c.lineItems.map((li) => ({
        item_id: li.variant?.product?.id,
        item_name: li.title,
        item_variant: li.variant?.title,
        price: li.variant?.price?.amount,
        quantity: li.quantity
      }))
    }
  });
});

Two things surprise people. Custom pixels run in a sandbox: they can’t read or change your theme’s page, and the page URL GA4 sees must be set from the event data rather than read from the browser. And GTM’s preview mode is harder to use inside a pixel, so testing relies more on GA4’s DebugView and real test orders.

Method 3: a tracking app

Apps such as Analyzify or Elevar provide a ready-made data layer and GA4 setup, often with server-side options. They are a middle ground: more control than the native app, less work than a custom setup, with a subscription. I compare them in Elevar vs Analyzify vs Stape vs custom GTM.

Shopify events and their GA4 equivalents

Shopify customer eventGA4 event
page_viewedpage_view
collection_viewedview_item_list
product_viewedview_item
search_submittedsearch
product_added_to_cartadd_to_cart
product_removed_from_cartremove_from_cart
cart_viewedview_cart
checkout_startedbegin_checkout
checkout_shipping_info_submittedadd_shipping_info
payment_info_submittedadd_payment_info
checkout_completedpurchase

GA4 settings to check on any method

  • Timezone and currency identical to your Shopify store, otherwise daily numbers never line up.
  • Referral exclusions for payment providers such as PayPal, so returning buyers don’t start a new session credited to the payment site.
  • Internal traffic excluded, including test orders.
  • Data retention set to 14 months.
  • Purchase marked as a key event.
  • One method only: never run the app and a GTM purchase tag at the same time. See duplicate purchase events.

Check that it works

Place a real order and check it in DebugView. Then, after a week, match GA4 purchases with Shopify orders by order ID, as explained in why GA4 shows fewer purchases than Shopify.

Which method should you choose?

  • Small store, no paid ads yet: the Google & YouTube app.
  • Running ads on several platforms, or need custom events: GTM in a custom pixel, ideally with server-side tracking.
  • Want a packaged product with support: a tracking app.

If you’d rather have it done and checked against your orders, my Starter package sets up GA4 with GTM and Consent Mode v2 for 1,300€, and the Professional package adds server-side tracking for every ad platform. See the Shopify tracking packages or book a free call.

Elliot Latil

Freelance web analyst specialised in GA4, GTM and Shopify tracking. About me