How Do I Add Google Analytics (GA4) to My Shopify Site?

If you need to add GA4 to your Shopify site, here's how.

Adding Google Analytics 4 (GA4) to your Shopify store helps you track customer behavior and optimize your store's performance. Here’s a simple, step-by-step guide to get it done. And don’t forget—once it’s set up, make sure to sync your GA with your Diib dashboard for personalized insights!


1. Create a Google Analytics Account and Set Up GA4

Sign Up for Google Analytics:
Go to Google Analytics and log in with your Google account. If you’re new, you’ll need to create an account.

  1. Create a New GA4 Property:

    • Click the Admin gear icon at the bottom left of the Analytics dashboard.
    • Under the Property column, click Create Property and fill in your store's details (name, time zone, currency).
    • Select Web as the platform.
  2. Set Up a Data Stream:

    • Enter your store’s URL and name the data stream.
    • You’ll receive a Measurement ID (e.g., G-XXXXXXXXXX)—save this for later.

2. Add GA4 to Your Shopify Store

Shopify makes it easy to connect Google Analytics through the Google & YouTube channel app:

  • Install the Google & YouTube Channel App:

    • In your Shopify admin, go to Online Store > Preferences.
    • Under the Google Analytics section, click Manage pixel here.
    • If prompted, install the Google & YouTube channel app.
  • Connect Your Google Account:

    • Sign in with your Google account and grant the necessary permissions.
    • Link the Google account associated with your GA4 property.
  • Select Your GA4 Property:

    • In the Your Google Analytics property section, choose the GA4 property you created earlier.
    • Click Connect to link the property to your Shopify store.

Shopify will automatically add the necessary GA4 tags to your store, so you don’t have to worry about coding!


3. Verify the Setup

  1. Check Real-Time Reports:
    In your GA4 dashboard, go to Realtime to confirm that your visits are being tracked.

  2. Use Debugging Tools:
    Install the Google Analytics Debugger Chrome extension to ensure your data is being sent correctly.


4. Don’t Forget to Sync with Diib!

Once GA4 is set up, sync your Google Analytics with your Diib dashboard. This allows Diib to analyze your data and provide personalized insights to help grow your Shopify store.


By following these steps, you’ll have GA4 integrated with your Shopify store in no time. For more detailed instructions, visit Shopify’s official guide. And remember, syncing with Diib ensures you get the most out of your data—don’t skip this step!