← Back to Blog

Shopify Tracking Setup 2025 - GA4 + GTM Step-by-Step (No Mistakes!)

Is your Shopify tracking set up correctly? If not, you're losing valuable data and making wrong decisions.

In this step-by-step guide, I'll show you how to properly set up GA4 eCommerce tracking for Shopify using Google Tag Manager — without the common mistakes that break your data.

Why Proper Shopify Tracking Matters

Bad tracking leads to:

Good tracking gives you:

What You'll Learn

Purchase Event Tracking

Track every sale accurately:

Add to Cart Tracking

Capture buying intent:

User Behavior Tracking

Understand your visitors:

Accurate Data Flow into GA4

Ensure reliable reporting:

Shopify Tracking Architecture

The proper setup flow:

Shopify Store
    ↓
Data Layer (Events + Product Data)
    ↓
Google Tag Manager
    ↓
GA4 (Analytics)
    ↓
Google Ads / Meta (Advertising)

Step-by-Step Setup Guide

Step 1: Install Google Tag Manager on Shopify

Add GTM to your store:

  1. Get your GTM container code
  2. Add to theme.liquid (head section)
  3. Add noscript to body
  4. Verify installation

For Shopify checkout:

Step 2: Create Data Layer

Push e-commerce events:

View Item Event:

dataLayer.push({
  event: 'view_item',
  ecommerce: {
    currency: 'USD',
    value: 49.99,
    items: [{
      item_id: 'SKU-123',
      item_name: 'Product Name',
      price: 49.99,
      item_category: 'Category',
      quantity: 1
    }]
  }
});

Purchase Event:

dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: '{{ order.name }}',
    value: {{ checkout.total_price | money_without_currency }},
    currency: '{{ shop.currency }}',
    items: [/* product array */]
  }
});

Step 3: Configure GTM Tags

Create these tags:

GA4 Configuration Tag:

GA4 Event Tags:

Step 4: Set Up Variables

Create data layer variables:

Step 5: Create Triggers

Set up event triggers:

Step 6: Test Everything

Verify your setup:

  1. Enable GTM Preview Mode
  2. Browse products (check view_item)
  3. Add to cart (check add_to_cart)
  4. Start checkout (check begin_checkout)
  5. Complete purchase (check purchase)
  6. Verify in GA4 DebugView

Common Shopify Tracking Mistakes

Mistake 1: Installing GTM Twice

Problem: GTM in theme AND app Result: Duplicate events, inflated data Fix: Use only one installation method

Mistake 2: Missing Checkout Tracking

Problem: No access to checkout pages Result: Missing purchase events Fix: Use Additional Scripts or Customer Events

Mistake 3: Wrong Currency Format

Problem: Currency as "$49.99" instead of 49.99 Result: Revenue showing as zero Fix: Use money_without_currency filter

Mistake 4: No Transaction ID

Problem: Missing order ID Result: Duplicate purchases counted Fix: Always include transaction_id

Mistake 5: Hardcoded Values

Problem: Static values instead of dynamic Result: Same value for every purchase Fix: Use Liquid variables

Shopify-Specific Challenges

Checkout Limitations

Shopify restricts checkout access:

Standard Shopify:

Shopify Plus:

AJAX Cart

Handle dynamic carts:

Multi-Currency

For international stores:

E-commerce Events Reference

Required Events

| Event | Trigger Point | Required Parameters | |-------|--------------|---------------------| | view_item | Product page | items, value, currency | | add_to_cart | Add to cart click | items, value, currency | | begin_checkout | Checkout start | items, value, currency | | purchase | Thank you page | transaction_id, value, items |

Recommended Events

| Event | Purpose | |-------|---------| | view_item_list | Collection pages | | select_item | Product click from list | | add_payment_info | Payment step | | add_shipping_info | Shipping selection |

Shopify Apps vs Custom Implementation

Using Apps

Popular options:

Pros:

Cons:

Custom Implementation

Pros:

Cons:

My recommendation: Custom implementation for serious stores, apps for quick setups.

GA4 Reports for Shopify

After setup, use these reports:

E-commerce Purchases

Purchase Journey

Product Performance

Integration with Advertising

Connect your tracking to:

Google Ads

Meta (Facebook)

Other Platforms

Shopify Store Types I Help

Results After Proper Setup

Clients typically see:

Need Help With Shopify Tracking?

If your Shopify store has:

I can fix it for you.

My services:

Contact me or message me on WhatsApp for a free tracking audit.

Free Tools

Insighter Debugger - Debug your Shopify tracking instantly:

Get Insighter Debugger


Stop losing Shopify data. Set up proper tracking and make confident decisions.


Keywords: Shopify GA4 tracking 2025, Shopify GTM setup, Shopify eCommerce tracking, GA4 Shopify tutorial, Shopify Google Tag Manager, Shopify purchase tracking, Shopify add to cart tracking, Shopify analytics setup, Shopify conversion tracking

Chat Now