GridWork HQ
Integrations

Google Analytics 4

Connect GA4 for client website analytics in the GridWork HQ dashboard.

Google Analytics 4

The GA4 integration displays client website traffic data directly in the dashboard.

What It Does

  • Pulls GA4 property data (sessions, users, page views, bounce rate) into the dashboard
  • Shows traffic trends over configurable time ranges
  • Enables you to monitor client site performance without switching to the Google Analytics console

Setup

1. Create a Google Cloud Service Account

  1. Go to console.cloud.google.com
  2. Create a project (or select an existing one)
  3. Enable the Google Analytics Data API
  4. Go to IAM & Admin > Service Accounts > Create Service Account
  5. Download the JSON key file

2. Grant Access in GA4

  1. Open your GA4 property
  2. Go to Admin > Property Access Management
  3. Add the service account email with Viewer role

3. Find Your GA4 Property ID

In GA4, go to Admin > Property Settings. The Property ID is a numeric value (e.g., 123456789).

4. Configure Environment Variables

Convert the service account JSON to a single line and add to your env:

# In gridwork-hq/.env.local
GOOGLE_SERVICE_ACCOUNT_JSON={"type":"service_account","project_id":"..."}
GA4_PROPERTY_ID=123456789

Environment Variables

VariableRequiredPurpose
GOOGLE_SERVICE_ACCOUNT_JSONNoService account JSON as a single-line string
GA4_PROPERTY_IDNoGA4 property ID (numeric)

Without This Integration

Without GA4 configured, the analytics sections of the dashboard show "Not configured." All other features work normally.

On this page