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
- Go to console.cloud.google.com
- Create a project (or select an existing one)
- Enable the Google Analytics Data API
- Go to IAM & Admin > Service Accounts > Create Service Account
- Download the JSON key file
2. Grant Access in GA4
- Open your GA4 property
- Go to Admin > Property Access Management
- 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=123456789Environment Variables
| Variable | Required | Purpose |
|---|---|---|
GOOGLE_SERVICE_ACCOUNT_JSON | No | Service account JSON as a single-line string |
GA4_PROPERTY_ID | No | GA4 property ID (numeric) |
Without This Integration
Without GA4 configured, the analytics sections of the dashboard show "Not configured." All other features work normally.