> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/google-analytics-4.md).

# Google Analytics 4

Find your Measurement ID and API Secret in Google Analytics 4 and add them to MESA to send events to GA4 from your workflows.

### Connection

When you're setting up your first workflow with Google Analytics 4, you'll need to add your **Google Analytics Measurement ID** and **API Secret** so that Google Analytics 4 is a connected app within MESA.

<figure><img src="https://docs.getmesa.com/assets/image%20%28451%29.png" alt="Screenshot of the Google Analytics 4 connection panel in the MESA workflow builder. Spotlight the Measurement ID and API Secret fields."><figcaption></figcaption></figure>

Read the following to locate those 2 values. These next steps assume that you already have a Google Analytics 4 property. If you do not have one already, [please create one](https://support.google.com/analytics/answer/9744165#zippy=%2Cin-this-article).

1\. Sign in to your [Google Analytics Account](https://analytics.google.com/).

2\. Click on **Admin** from the left-hand sidebar.

<figure><img src="https://docs.getmesa.com/assets/image%20%28165%29.png" alt="Screenshot of the Google Analytics dashboard. Spotlight the Admin link in the left-hand sidebar."><figcaption></figcaption></figure>

3\. Ensure that you have the correct Account selected under **Account**.

<figure><img src="https://docs.getmesa.com/assets/image%20%28168%29.png" alt="Screenshot of the Google Analytics Admin settings. Spotlight the Account selector."><figcaption></figcaption></figure>

4\. Ensure that you have the correct Property selected under **Property**.

<figure><img src="https://docs.getmesa.com/assets/image%20%28166%29.png" alt="Screenshot of the Google Analytics Admin settings. Spotlight the Property selector."><figcaption></figcaption></figure>

5\. Under Data collection and modification, select **Data Streams**.

<figure><img src="https://docs.getmesa.com/assets/image%20%28169%29.png" alt="Screenshot of the Google Analytics Admin settings under Data collection and modification. Spotlight the Data Streams option."><figcaption></figcaption></figure>

6\. Click on your preferred Data Stream. If you don't already have one, add a new stream.

<figure><img src="https://docs.getmesa.com/assets/image%20%28170%29.png" alt="Screenshot of the Google Analytics Data Streams page. Spotlight your preferred data stream."><figcaption></figcaption></figure>

7\. Locate where it says **Measurement ID** in the Stream details section. Click on the copy icon.

<figure><img src="https://docs.getmesa.com/assets/image%20%28171%29.png" alt="Screenshot of the Google Analytics Stream details page. Spotlight the Measurement ID copy icon."><figcaption></figcaption></figure>

8\. Paste the copied values into your MESA's GA4 Connection **Key** field.

<figure><img src="https://docs.getmesa.com/assets/image%20%28172%29.png" alt="Screenshot of the MESA Google Analytics 4 connection panel. Spotlight the Key field."><figcaption></figcaption></figure>

9\. Next, scroll down on the same page until you see Events - **Measurement Protocol API secrets.** Click on it.

<figure><img src="https://docs.getmesa.com/assets/image%20%28173%29.png" alt="Screenshot of the Google Analytics Stream details page under Events. Spotlight the Measurement Protocol API secrets option."><figcaption></figcaption></figure>

10\. Click on the copy icon next to your preferred API secret. If you do not have one already, please create one.

<figure><img src="https://docs.getmesa.com/assets/image%20%28174%29.png" alt="Screenshot of the Google Analytics Measurement Protocol API secrets page. Spotlight the copy icon next to your API secret."><figcaption></figcaption></figure>

11\. Paste the copied values into your MESA's GA4 Connection **Secret** field.

<figure><img src="https://docs.getmesa.com/assets/image%20%28175%29.png" alt="Screenshot of the MESA Google Analytics 4 connection panel. Spotlight the Secret field."><figcaption></figcaption></figure>

12\. Click **Add Connection** and you are all set! You can now re-use the newly created connection and select it for your future workflows!

### Configure

#### Locate your Ecommerce events sent from MESA in Google Analytics

:::note
**🗒 Important Note**: After your workflow triggers, it will take up to 24-48 hours to see data appear in the [Ecommerce purchase report](https://support.google.com/analytics/answer/12924131?visit_id=638062222372803843-2762436710\&rd=1) due to Google Analytics' processing times. You can use the [Realtime report](https://support.google.com/analytics/answer/9271392?hl=en\&ref_topic=9303476) to confirm that you're collecting data from your website or app successfully.
:::

1\. In your Google Analytics account, click on **Reports**, then **Monetization**, and then **Ecommerce purchases** in the left sidebar.

<figure><img src="https://docs.getmesa.com/assets/image%20%28176%29.png" alt="Screenshot of the Google Analytics Reports section. Spotlight the Monetization then Ecommerce purchases options in the left sidebar."><figcaption></figcaption></figure>

2\. You will be taken to the **Ecommerce purchases** report page where you can view different ecommerce events.

:::note
**🗒 Note**: If you are not seeing the data from today, please adjust the view dates of your **Ecommerce purchases** report to include today's date by clicking on the [date range selector.](https://support.google.com/analytics/answer/1010052?hl=en)
:::

![Screenshot of the Google Analytics Ecommerce purchases report showing ecommerce events sent from MESA. Spotlight the ecommerce events table.](https://docs.getmesa.com/assets/file-idlq07rg55.png)
