Thumbnail

How to Add Google Analytics (GA) to Shopify 2025

· 2 min read

Step 1: Get Your Google Analytics Measurement ID

  • Log in to Google Analytics.
  • Click Admin (bottom-left corner).
  • Under Property, go to Data Streams.
  • Select your store's data stream.
  • Copy the Measurement ID (e.g., "G-XXXXXXXXXX").
Image

Step 2: Add Google Analytics to Shopify

  • Log in to Shopify Admin.
  • Go to SettingsCustomer Events.
  • Click Add Custom PixelCreate a Custom Pixel.
  • Enter a Pixel name (e.g., Google Analytics 4).
  • Paste the following code in the Pixel Code section:
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX'); // Replace with your GA4 Measurement ID
  • Click Save and then Connect the pixel.
ImageImage

Step 3: Enable Enhanced Ecommerce Tracking

  • In Google Analytics, go to Admin.
  • Under Property Settings, click Data Streams.
  • Ensure Enhanced Measurement is enabled.

Step 4: Verify Your GA Integration

  • In Google Analytics, go to ReportsRealtime.
  • Open your Shopify store in a new tab.
  • Browse different pages and check if activity appears in GA.
Image

Alternative Method: Use Shopify’s Google App

If you prefer an easier setup, you can install the Shopify Google App:
🔗 Google & YouTube App

  • Install the Google & YouTube App from the Shopify App Store.
  • Connect your Google account linked to your GA4 property.
  • Follow the setup wizard to link your store to GA4.

✅ This method automatically integrates GA4 without needing manual code.

Image

Pro Tip:

  • For better event tracking, use Google Tag Manager (GTM).
  • Enable eCommerce tracking in GA for advanced sales insights.

Now your Shopify store is successfully connected to Google Analytics! 🚀

Mint DQ

About Mint DQ

Mint DQ: A Dedicated Shopify Support Staff with 7 Years of Experience

Nam Phan is an exceptional member of the Shopify Support team, having dedicated seven years to helping Shopify merchants succeed. His extensive experience and commitment to excellence make him a valuable asset for anyone seeking assistance with their Shopify store.

Copyright © 2025 JinCoder. All rights reserved.
Made by Web3Templates· Jin Alkaid