Google Analytics 4 API guide

analytics.google.com

Use Google Analytics 4 to report on traffic and conversions, compare performance across periods, and review live activity.

Actions and inputs

report

Run a report with the metrics and dimensions you choose.

Inputs property ID, metrics, dimensions, date range, optional filter

realtime

Review live activity for an authorized property.

Inputs property ID

channels

Break down sessions, users, conversions, and revenue by channel group.

Inputs property ID, date range

compare

Measure how selected metrics change between reporting periods.

Inputs property ID, metrics, comparison period

Explorations

Create

Create a private exploration in a GA4 property where you have exploration permissions.

Inputs Property, exploration name, technique, dimensions, metrics

Read

Open an exploration you can access and review its tabs and results.

Inputs Property, exploration

Update

Adjust the segments, filters, or date range of an exploration you own.

Inputs Exploration, tab, revised settings

Delete

Delete an exploration you own without changing the underlying analytics data.

Inputs Exploration, deletion confirmation