Skip to main content
Plexara

Google Analytics 4

The Google Analytics Data API is the reporting interface to GA4: sessions, users, acquisition channels, landing pages, events, and ecommerce. Plexara connects an assistant to it through a Google sign-in limited to reading.

Catalog
Google Analytics Data API v1beta
Operations indexed
11
Access
Read

A report is a request of dimensions, metrics, date ranges, and filters. The assistant reads the property's own dimension and metric list, checks that a combination can be reported together, and builds the report from a plain-language question. The knowledge page on the connection holds the property ids, the site each one measures, and the reporting traps that are easy to miss.

Endpoint surface

What the assistant can reach

AreaOperationsCovers
Reports4A customized report, a pivot report, and batch forms of both. Several date ranges in one request give a before-and-after comparison in a single call.
Realtime1Activity over roughly the last thirty minutes, by screen, country, and device.
Metadata and compatibility2Every dimension and metric a property supports, including its custom dimensions, and a check that a chosen combination can be reported together.
Audience exports4List, create, read, and query exports of the users in a GA4 audience.

Example questions

Questions an assistant can answer

  • Which channels drove sessions in the last 28 days, and how does that compare with the 28 days before?
  • Which landing pages gained or lost the most traffic since the redesign?
  • What share of sessions comes from mobile, by state?
  • Is traffic reaching the site right now?
  • On which day did this property first record data?
  • How did web sessions track against store sales in the week before the holiday?

Knowledge pages

The knowledge on this connection

Most wrong GA4 answers come from the property's setup. A knowledge page attached to the connection records that setup once, so the assistant uses the right property and the dimensions that actually exist on it.

  1. 1

    Permission denied also covers a property that does not exist

    GA4 returns the same permission error for a property the account cannot see and for an id with a typing error. The page tells the assistant to call a known-good property first, then verify the id, before anyone goes looking for a missing grant.

  2. 2

    Reports take the numeric property id

    The G- measurement id belongs to a data stream and cannot be used for reports. The page lists each property id, the site it measures, and the first day it has data.

  3. 3

    Only registered custom dimensions can be reported

    A parameter the site sends is reportable only after it is registered as a custom dimension on that property, and registration is not backfilled. The page lists which are registered on which property.

  4. 4

    The reporting day may not be the sales day

    Each property reports in its own time zone. When that differs from the time zone sales are recorded in, daily traffic lands against the wrong sales day. The page states the offset.

  5. 5

    Headers with no rows means no traffic

    A response with headers and no rows is zero traffic for the window. Requests reaching before December 2018 are truncated by the API itself.

Combinations

Works with

A campaign, from spend to gift. Did the spring membership campaign work, and which channel carried it?

Marketing activity against sales. What did last week's text campaign and posts do for store sales?

The full index of APIs in production is on the API connections page.

Plexara is not affiliated with or endorsed by Google. Google is a trademark of its owner.

Next

API connections

The APIs already in service, and the questions that use more than one of them in a single session.