# Connect Google Analytics 4 (GA4)

### Required preparation before connecting

Before connecting GA4 to PageFly, ensure you have:

1. **A Google Analytics 4 property set up**

* If you haven't created one yet, follow [Google's GA4 setup guide](https://support.google.com/analytics/answer/9304153)
* GA4 is free for most businesses

2. **Proper account permissions**

* Your Google account needs an **Editor** or **Admin** role on the GA4 property
* Check this in GA4: **Admin** → **Property access management**

3. **User Data Collection Terms acknowledged** (required for sales and revenue tracking)

* If you encounter an error, click the “See how” button in the error message to see instructions on how to fix it.

4. **Matching currencies**

* Currency in GA4 must match your Shopify store's currency
* Check GA4: **Admin** → **Property details** → **Currency**

### How to Connect GA4

#### Step 1: Access the connection modal

1. Click **Analytics** in PageFly's left sidebar
2. You'll see a demo dashboard with a banner saying "You're viewing demo Analytics"
3. Click the **Connect GA4** link on the banner or the <img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fh9BWcZlHICVLQhFM5cGK%2FScreenshot%20at%20Jan%2022%2015-19-03.png?alt=media&#x26;token=9b6a4556-61ba-409f-bd2e-fc4f786e8090" alt="" data-size="line"> button in the Google Analytics 4 section

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2F3zE0CXLjMyQVw84SRMKT%2Fimage.png?alt=media&#x26;token=4d458a6d-66b5-4e3a-9e31-8a412eb16e19" alt=""><figcaption></figcaption></figure>

You will be taken to the Analytics settings interface at **Preferences > Analytics**. Here, check the box next to **Enable PageFly Analytics**:

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FNItorXBPVKhWJpCSJl5z%2Fimage.png?alt=media&#x26;token=09a31948-8002-4e7c-9488-955befac13cd" alt=""><figcaption></figcaption></figure>

#### Step 2: Sign in with Google

After clicking on the checkbox **Enable PageFly Analytics**:

1. A Google sign-in pop-up appears
2. Grant PageFly full permissions to access your GA4 data

   * PageFly needs these permissions to fetch analytics data and create custom dimensions
   * **If you deny any permissions**, the connection will fail and you'll need to start over

   <figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FbUPUqESYxanga9jR60RA%2Fimage.png?alt=media&#x26;token=9cef9bb4-7a78-4f44-863d-92b9baef3a27" alt="Google OAuth screen showing permission request"><figcaption></figcaption></figure>

#### Step 3: Select your GA4 account, property, and data stream

After successful OAuth, you'll see three dropdown menus:

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FZxOWXzPFp2OVETxxt74o%2Fimage.png?alt=media&#x26;token=0212ce05-0f85-4100-8541-40f911b019a2" alt=""><figcaption></figcaption></figure>

**1. Select Account**

* Choose your GA4 account from the dropdown

**2. Select Property**

* Choose the GA4 property for your Shopify store
* If you have multiple properties, select the one tracking your storefront

**3. Select Data Stream**

* Choose the web data stream for your store
* If you have multiple streams, select the one associated with your store

#### Step 4: Save and Verify

1. Click the **Select** button at the bottom of the modal
2. PageFly will verify your connection and start fetching data
3. You'll see a success message and a green "Connected" badge when the connection is established

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FcRqzT8eVo1u1gSsE3b3l%2Fimage.png?alt=media&#x26;token=efe94b83-b0e7-4a48-8c25-187acdd1ac3c" alt=""><figcaption></figcaption></figure>

***

### Handling connection errors

If you encounter errors during setup, here's how to resolve them:

#### Error: **"No accounts found."**

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fnz1UMdJI3MPHTP7nJ91p%2Fimage.png?alt=media&#x26;token=b01e47de-7bac-43c5-92ea-a54289296226" alt=""><figcaption></figcaption></figure>

**What it means:**

* You don't have access to any GA4 properties with this Google account
* Or you haven't created one

**How to fix:**

1. Ask your GA4 administrator to grant you Editor or Admin access
2. Config GA4 property by following [Google's GA4 setup guide](https://support.google.com/analytics/answer/9304153)

#### **Error:** **"No properties found"** or **"No data streams found."**

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FWAtW1QDP58Xb9qfEHtcx%2Fimage.png?alt=media&#x26;token=b8490b5b-e2db-45ab-a632-4b8bb42d7fdc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2F1hB9sCGxnmn2YY5sGEUw%2Fimage.png?alt=media&#x26;token=59f31e8e-0be2-4791-a878-0c700f19dfa7" alt=""><figcaption></figcaption></figure>

**What it means:**

* Your GA4 account doesn't have a property or a web data stream configured, or they were deleted

**How to fix:**

1. Go to GA4 → Admin and then create a new Property or Data stream
2. Return to PageFly and start over the connecting process

#### Error: "Missing access to your GA4 account."

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fi35xJK4JA39ymxC3Gowy%2Fimage.png?alt=media&#x26;token=25ac7724-35b8-4fb4-af04-6d23ef9e6071" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FDkTldK2Qn6FWCytTBlsa%2Fimage.png?alt=media&#x26;token=8276418f-0d87-4c99-812a-96d7710bbdc9" alt=""><figcaption></figcaption></figure>

**What it means:** Your Google account doesn't have sufficient permissions on the GA4 property, or you haven't granted PageFly full permissions.

**How to fix:**

1. Start over the connecting to GA4 process by clicking on the <img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fh9BWcZlHICVLQhFM5cGK%2FScreenshot%20at%20Jan%2022%2015-19-03.png?alt=media&#x26;token=9b6a4556-61ba-409f-bd2e-fc4f786e8090" alt="" data-size="line"> button.
2. Remember to grant PageFly full permissions in [Step 2](#step-2-sign-in-with-google).

#### Error: "User Data Collection Acknowledgement Required"

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FdonVu581sDWTwp1spUhn%2FCleanShot%202026-01-22%20at%2014.41.19%402x.jpg?alt=media&#x26;token=20d9983a-99f3-4c7e-9ef9-b1c5bb44fccb" alt=""><figcaption></figcaption></figure>

**What it means:** You haven't acknowledged Google's data collection terms in GA4. This is required to track revenue metrics.

**How to fix:**

1. Access the [Data streams table](https://analytics.google.com/analytics/web/?utm_source=demoaccount\&utm_medium=demoaccount\&utm_campaign=demoaccount#/a54516992p213025502/admin/streams/table) in your GA4 account and select the data stream that you want to connect.

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FYMOxzqzOeU0EDuDFq180%2Fimage.png?alt=media&#x26;token=6c650f24-854e-4a22-a26f-56e21ec834c0" alt=""><figcaption></figcaption></figure>

2. Scroll down and click **Measurement Protocol API secrets**

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2FIyoZpGvhMyyaWVbKgmIG%2Fimage.png?alt=media&#x26;token=4f2cf018-9f89-402f-8e16-4dfd16f6e437" alt=""><figcaption></figcaption></figure>

3. You'll see a banner about User Data Collection. Click the **Review terms** button
4. Read the terms and select **I acknowledge**

<figure><img src="https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2F3iytwX7VyZHqCniZaGbk%2Fimage.png?alt=media&#x26;token=3e7961b5-97d7-48a9-bbc4-765de88a2da7" alt=""><figcaption></figcaption></figure>

5. Return to PageFly and click **Save** again in the connection modal

***

#### Post-connection Tips

**If your connection drops, check if:**

* OAuth token expired (refresh needed every \~6 months for security)
* Your GA4 permissions changed
* The GA4 property was renamed or deleted
* The GA4 data stream was renamed or deleted

**Solution:** Go to the Analytics page → Click **Connect** and repeat the connection steps.
