ga4_event_counts
Get event counts and unique users for selected events or a prefix, with optional time granularity and dimension splits such as platform or country.
Instructions
Event count and unique users for a list of events (or every event starting with a prefix), optionally over time (day, ISO week or month) and split by one more dimension such as platform or country. Unique users are deduplicated within each period, so they cannot be summed across periods. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| events | No | Exact event names | |
| prefix | No | Event name prefix, e.g. "Checkout_". Used when events is empty | |
| end_date | Yes | End date: YYYY-MM-DD, or relative like "today" | |
| property | No | Saved property name (see ga4_list_properties). Defaults to the default property. | |
| split_by | No | Extra dimension API name, e.g. "platform", "country", "appVersion" | |
| start_date | Yes | Start date: YYYY-MM-DD, or relative like "7daysAgo", "yesterday", "today" | |
| granularity | No | Time grouping | none |