Back to Documentation
Google Integrations

Google Analytics 4 (GA4) Setup

Add your Google Analytics 4 measurement ID to your IHASHOP store. Start measuring visitors, product interactions, and sales without editing theme files or adding tracking code manually.

What Is Google Analytics 4?

Google Analytics 4 is Google’s analytics service for measuring how visitors interact with your store.

With GA4, you can monitor:

  • How many visitors come to your store
  • Which pages visitors view
  • Which products attract the most interest
  • Which products users add to their carts
  • How many users begin the checkout process
  • How many orders are completed
  • Which traffic sources generate sales and revenue

Google Analytics does more than count visitors. When configured correctly, it also helps you analyse the e-commerce activity taking place in your store.

Requirements Before Setup

To set up Google Analytics 4, you need a GA4 measurement ID.

A GA4 measurement ID begins with “G-” and looks similar to this:

G-A1B2C3D4E5

Codes beginning with “UA-” belong to the former Universal Analytics system and should no longer be used.

Make sure the code entered into the IHASHOP panel begins with “G-”.

How to Obtain a GA4 Measurement ID

Follow these steps to obtain your Google Analytics 4 measurement ID:

  1. Sign in to your Google Analytics account.
  2. Create a GA4 property for your store.
  3. Open the Admin section.
  4. Go to Data Streams.
  5. Create a Web data stream.
  6. Enter your store domain.
  7. Create the data stream.
  8. Find the Measurement ID on the page that opens.
  9. Copy the code beginning with “G-”.

This code connects your store to the relevant Google Analytics property.

Adding Google Analytics 4 to IHASHOP

To add the GA4 measurement ID to your store:

  1. Sign in to the IHASHOP administration panel.
  2. Open Settings → SEO and Analytics.
  3. Find the Google Analytics Measurement ID field.
  4. Paste the measurement ID beginning with “G-” into the field.
  5. Save the settings.

No additional tracking code is required.

IHASHOP automatically places the necessary Google Analytics tracking code on the storefront pages.

Is It Necessary to Add Code to Theme Files?

No.

The Google Analytics code is not added manually to theme files. The measurement code operates through IHASHOP’s shared system layer.

An important advantage of this structure is that Google Analytics tracking continues to work when you change the store theme.

When Analytics code is added directly to a theme, changing the theme may cause:

  • Tracking to stop
  • The code to require manual installation in the new theme
  • Analytics data to be lost
  • The problem to remain unnoticed for an extended period

Because IHASHOP uses a shared system layer, your Google Analytics configuration continues working independently of theme changes.

When Should Google Analytics Be Installed?

Google Analytics does not collect historical data retroactively.

For this reason, GA4 should be installed as early as possible.

The ideal time is before your store becomes available to visitors.

When GA4 is installed several weeks after the store goes live, earlier visitor and sales activity cannot be added to Analytics reports later.

Even when your store is still being prepared, it is recommended to add the GA4 measurement ID.

Data Measured After Setup

After Google Analytics 4 setup is completed, basic visitor and page-view measurement begins.

IHASHOP can also send the standard events required for e-commerce tracking.

These events include:

  • Product views
  • Adding products to the cart
  • Beginning the checkout process
  • Purchases

This means you can analyse not only how many visitors enter the store, but also how far they progress through the purchasing journey.

The e-commerce events are explained in detail in the “GA4 E-Commerce Events: Automatically Submitted Data” article.

How to Check Whether Google Analytics Is Working

After completing the setup, you can use the Google Analytics Realtime report to confirm whether tracking is active.

Follow these steps:

  1. Open your storefront in a new browser tab.
  2. Visit several storefront pages.
  3. Open a product detail page.
  4. Return to your Google Analytics account.
  5. Open Reports → Realtime.
  6. Check whether your visit appears as an active user.

It may take a few seconds or a short period for the data to appear.

For a more detailed review, you can use Google Analytics DebugView. DebugView allows you to inspect the individual events sent by your store.

What to Check When the Measurement ID Is Not Working

When no data appears in Google Analytics, review the following points.

Check the Measurement ID

Make sure the entered code begins with “G-”.

The code should not contain quotation marks, spaces, or additional characters at the beginning or end.

Former Universal Analytics codes beginning with “UA-” do not work.

Make Sure the Settings Were Saved

After pasting the measurement ID into the relevant field, you must save the settings.

Entering the code and leaving the page without saving is a common mistake.

Check the Website Cache

When your store uses a cache or CDN, an older page version may still be displayed.

Wait a few minutes and reload the page using a hard refresh.

Disable the Ad Blocker

Some browser extensions block Google Analytics requests.

Repeat the test:

  • With the ad blocker disabled
  • In a private browsing window
  • In another browser
  • On another device

Test on the Storefront

Google Analytics measurement is used for the customer-facing storefront.

Administration pages under “/secure” are intentionally excluded from tracking.

For this reason, do not expect visits inside the administration panel to appear in Analytics.

Perform the test on the storefront used by customers.

Important Considerations When Using Google Tag Manager

Google Analytics 4 can also be configured through Google Tag Manager.

However, you should not activate the same GA4 measurement through both Google Tag Manager and the direct GA4 field in the IHASHOP panel.

When both methods are used simultaneously:

  • Page views may be counted twice
  • E-commerce events may be submitted twice
  • Orders may be reported as duplicate conversions
  • Conversion rates may be calculated incorrectly

Choose only one method for Google Analytics measurement:

  • The direct GA4 measurement ID field in the IHASHOP panel
  • A GA4 tag configured through Google Tag Manager

When you only use Google Analytics, adding the measurement ID directly to the IHASHOP panel is the simpler method.

Does Google Analytics Work Independently of Merchant Center?

Yes.

Google Analytics 4 and Google Merchant Center are separate services used for different purposes.

Google Analytics measures visitors and user behaviour in your store.

Google Merchant Center sends your products to the Google Shopping system.

Google Analytics can work even when no Merchant Center connection has been established.

Similarly, products can be submitted through Merchant Center even when Google Analytics has not been installed.

However, both services should be configured for their respective purposes to evaluate store performance accurately.

Next Step

After completing the Google Analytics 4 setup, continue with the “GA4 E-Commerce Events: Automatically Submitted Data” article.

This article explains how IHASHOP sends product views, add-to-cart actions, checkout starts, and purchases to Google Analytics.