> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commert.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Google Analytics

> Connect your store to Google Analytics 4 to see who visits, where they come from and what they buy.

Google Analytics shows you how people use your store: how many visit, where they come from, which products they look at and what they buy. The data goes to your own Google Analytics 4 property, so only you can see it.

In this guide, you'll learn how to connect Google Analytics to your store, and how to check that it works.

## What you get

* **Page views** from every page of your store.
* **Shopping events**: product views, add to cart, checkout started and purchases, with the order value.
* **Privacy-friendly tracking**: visitors in the EEA, the UK and Switzerland are measured without analytics cookies (Google Consent Mode).
* **No slowdown**: Google's script loads only after your store's page has finished loading.

## Before you start

* You need a [Google Analytics](https://analytics.google.com/) account with a **GA4 property** for your store. If you don't have one, create it in Google Analytics first.
* The property needs a **web data stream** for your store's address. You can pick or create it during setup.

***

## Connect with Google (recommended)

With this method, you sign in with Google and pick your store's data stream. Commert saves the Measurement ID for you.

> [!NOTE]
>
> This method needs a Google account that has access to your Google Analytics property. If you don't have one, use [Paste the Measurement ID](#paste-the-measurement-id) instead.

### Step 1 — Start the connection

1. Go to **Settings → Integrations**.
2. On **Google Analytics**, click **Connect with Google**.

![Google Analytics setup panel with the Connect with Google button](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-analytics/setup-drawer.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=f2a906fc6cee0ba7c8b4e82ce8d49e87)

### Step 2 — Sign in with Google

Google's sign-in page opens in a new window. Sign in with the Google account that has your Google Analytics property, then allow the access Commert asks for.

![Google sign-in window](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-sign-in.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=3160f2c40c674e9f4a45b98f86ca2ff6)

The setup panel shows **Waiting for Google** until you finish. See [Two ways to connect Google integrations](https://docs.commert.com/en/settings/integrations.md#two-ways-to-connect-google-integrations) if the window doesn't open.

### Step 3 — Choose a web stream

After you sign in, the panel lists the web data streams in your Google account. Each one shows its name, its Measurement ID and its website address.

1. Pick your store's stream. The stream that matches your store's address is marked **Best match** and is selected for you.
2. Click **Use this**.

![List of web streams with Best match on the store's stream](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-analytics/choose-web-stream.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=ce23ba23bb4b1294de5c665ce8530472)

> [!TIP]
>
> If your Google account has only one web stream, Commert picks it for you and skips this step.

### Step 4 — You're connected

The panel shows **Done** with the stream's name and Measurement ID, and the status changes to **Connected**.

![Google Analytics setup panel showing Done](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-analytics/connected-drawer.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=ad3a3e0fd9458ad7b679be6f7905ea78)

***

## Paste the Measurement ID

Use this method if you'd rather not sign in with Google here.

### Step 1 — Copy the Measurement ID from Google Analytics

1. Open [Google Analytics](https://analytics.google.com/).
2. Go to **Admin → Data streams**.
3. Click your store's web stream. If there isn't one, click **Add stream → Web** and enter your store's address.
4. Copy the **Measurement ID** at the top right. It looks like `G-XXXXXXXXXX`.

### Step 2 — Paste it in Commert

1. Go to **Settings → Integrations**.
2. On **Google Analytics**, click **Connect with Google**. The setup panel opens.
3. Under **Or paste it yourself**, paste the ID into the **Measurement ID** field.
4. Click **Connect**.

![Measurement ID pasted in the setup panel](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-analytics/paste-measurement-id.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=9e8145c6d4e4968be6f2c853931563a1)

The status changes to **Connected**.

> [!NOTE]
>
> If Google's sign-in window opens when you click **Connect with Google**, close it. The setup panel then shows the paste field.

***

## Check that it works

1. Open your store in a new browser tab and visit a few pages.
2. In Google Analytics, go to **Reports → Realtime**.
3. Your visit shows up within a couple of minutes.

***

## View or change the connection

In **Settings → Integrations**, click **Manage** on Google Analytics. The page shows your Google account, the setup progress and the saved **Measurement ID**.

![Google Analytics integration page](https://mintcdn.com/commert/aSaHrBhWLyrrttuw/images/user-guide/settings/integrations/google-analytics/integration-page.png?fit=max\&auto=format\&n=aSaHrBhWLyrrttuw\&q=85\&s=95083e01b74873d29be54a96b922cd3d)

* To use another stream, click **Change** next to the Measurement ID and pick another one.
* To disconnect, click the **⋯** button at the top right of the first card and click **Disconnect**. Your store stops sending data within a minute.

***

## Frequently asked questions

> [accordion] Will this slow down my store?
>
> No. Google's script loads only after your store's page has finished loading.

> [accordion] Which events are sent?
>
> Page views, `view_item`, `add_to_cart`, `begin_checkout` and `purchase`, in Google Analytics 4's ecommerce format.

> [accordion] Why are visitors from Europe missing details?
>
> Visitors in the EEA, the UK and Switzerland haven't agreed to analytics cookies, so Google gets only cookieless signals for them.

> [accordion] My Google account doesn't show any web stream. What do I do?
>
> Your Google account may not have access to a Google Analytics property, or the property has no web stream. Create a web stream in Google Analytics, or use [Paste the Measurement ID](#paste-the-measurement-id).

***

## Next steps

* [Integrations overview](https://docs.commert.com/en/settings/integrations.md) — statuses, managing and disconnecting integrations.
* [Google Search Console](https://docs.commert.com/en/settings/integrations/google-search-console.md) — verify your store with Google Search.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.