# How to connect to GA4

### What this feature does

Before using our product, your website data needs to be accessible.

This process consists of two steps:

1. Let Google Analytics 4 collect your website data
2. Connect GA4 to our platform

***

### Set up Google Analytics 4 for your website

***

### If you don’t have a GA4 account

#### Step 1: Create a GA4 account

**1.1 Start setup**

* Open Google Analytics
* Click **Start measuring**

<figure><img src="/files/rLinqYpRI6dM33mfDYVw" alt=""><figcaption></figcaption></figure>

**1.2 Create an account**

* Enter your **Account name**

**1.3 Create a property (your website)**

* Enter your website name
* Select timezone (e.g. Australia/Sydney)
* Select currency
* Choose industry category and business objectives

<figure><img src="/files/gN2eJi21XIwNCXByM7Zi" alt=""><figcaption></figcaption></figure>

***

#### Step 2: Create a data stream

**2.1 Select platform**

* Choose **Web**

<figure><img src="/files/jdYqZx6WYY7i5ntOByad" alt=""><figcaption></figcaption></figure>

**2.2 Enter details**

* Enter your website URL
* Name your data stream
* Click **Create and continue**

<figure><img src="/files/jZNoKMFb5NiuooYlZDdB" alt=""><figcaption></figcaption></figure>

***

#### Step 3: Install GA4

**Option A: Manual installation (for custom websites or technical users)**

**Copy the code**

* Click **View tag instructions**
* Copy the **Global Site Tag (gtag.js)**

<figure><img src="/files/ZOrRYm3tJwJ8cRcIb2EX" alt=""><figcaption></figcaption></figure>

**Add to your website**

* Paste the code into every page of your website, right after the `<head>` tag
* Make sure it is applied across all pages

**Publish**

* Save and deploy your website

***

**Option B: Install using Measurement ID (for non-technical users)**

**Step 1: Open GA4 dashboard**

* Go to Google Analytics <https://analytics.google.com/>
* Log in to your account
* Open your property (website)

**Step 2: Open Admin**

* Click **Admin (gear icon)** in the bottom-left

<figure><img src="/files/BNWEZH12Q07Z2WTBmpIs" alt=""><figcaption></figcaption></figure>

**Step 3: Go to Data Streams**

* Under Property, click **Data Streams**
* Select your website

<figure><img src="/files/Cp4r15AtQ0a1fIlKIrf0" alt=""><figcaption></figcaption></figure>

**Step 4: Find Measurement ID**

* Locate **Measurement ID (G-XXXXXXXXXX)**
* Copy it

<figure><img src="/files/obGJduLSRLHxLkrurcxE" alt=""><figcaption></figcaption></figure>

***

**Step 5: Add it to your website**

* **Shopify**
  * Settings → Customer events / Google channel
  * Paste the Measurement ID
* **WordPress**
  * Install a plugin (recommended: Site Kit)
  * Log in to GA4
  * Connect automatically
* **Wix**
  * Settings → Marketing Integrations
  * Paste the Measurement ID

***

#### Step 4: Verify

**4.1 Open Realtime**

* Go to GA4 → **Realtime**

**4.2 Test**

* Visit your website

**4.3 Confirm**

* If you see active users → GA4 is successfully connected and collecting data

***

### Connect GA4 to our platform

After GA4 is set up and collecting data, you can proceed to connect it to our platform.

👉 This allows us to analyze your traffic, visibility, and performance data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.workfx.ai/get-started/publish-your-docs-1/how-to-connect-to-ga4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
