VX Terminal Help

Google Analytics 4

Connect a brand's GA4 property to show sessions, users and key events (conversions) for the last 7 and 30 days. GA4 connects per brand. Figures refresh hourly.

What it lights up #

Set up a service account in Google Cloud #

  1. In the Google Cloud console, pick or create a project. Under APIs & Services → Library, find the Google Analytics Data API and press Enable.
  2. Open IAM & Admin → Service accounts and create a service account. It needs no project roles.
  3. Click the service account's email, open the Keys tab, then Add key → Create new key → JSON → Create. The JSON file downloads once; keep it safe.

If key creation fails with a policy error, your Google Cloud organization blocks service-account keys (this is the default for organizations created since May 2024). Ask your Google Cloud organization policy administrator for an exception for this one project.

Give it access in Google Analytics #

  1. In Google Analytics open Admin, and under the property choose Property access management (on some screens it is Access management).
  2. Press +, then Add users, enter the service account's email (it ends in .iam.gserviceaccount.com), choose the Viewer role and press Add. You need the Administrator role on the property to do this.
  3. Copy the Property ID from Admin → Property settings (or Property details). It is a number, like 312345678. It is not the G-… measurement ID.

Connect it in VX Terminal #

  1. Open Settings → Connections, find Google Analytics 4 under Marketing and press Connect on the brand's row.
  2. Enter the Property ID.
  3. Open the downloaded JSON file in a text editor and paste the whole file into Service-account key (JSON).
  4. Press Test, then Save.

How Test works #

Test signs in as the service account (read-only Analytics scope) and reads the property's sessions for the last 7 days, for example "Connected to property 312345678 as reports@acme.iam.gserviceaccount.com · 5,120 sessions in the last 7 days". Nothing is changed.

Common errors #

MessageFix
"Property ID is a measurement ID (G-…), not the property ID. Use the number under Admin → Property settings."Use the numeric Property ID.
"Service-account key (JSON) couldn't be used: …"Paste the whole downloaded .json file. The rest of the message says what is wrong with it.
"The service account can't read property …. In Google Analytics open Admin → Property access management and add … as a Viewer."Add the service account to the property as a Viewer.
"The Google Analytics Data API is turned off for the service account's Cloud project. Enable it in Google Cloud → APIs & Services, then test again."Enable the API in the same project as the service account.
"Google rejected the key's signature. The key may have been deleted or rotated; create a new JSON key for the service account."Create a new key and paste it.
"Google refused the service account. It may be disabled, or its key deleted."Re-enable the service account or create a new key.
"There's no Google Analytics property …."Check the Property ID.
"Google Analytics quota for this property is used up for now; the next refresh will try again."Nothing to do; it retries.

All help topics