GA4 period comparison
ga_compare_periodsCompare Google Analytics 4 metrics between two periods with dimension breakdowns, returning per-row changes and period totals.
Instructions
Compare GA4 metrics between a current and a previous period, broken down by dimensions (default: channel group). Returns per-row current/previous/delta/percent change plus period totals. Use it for 'how did organic traffic change vs last month'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows returned (sorted by absolute change of the first metric). | |
| metrics | No | ||
| currentEnd | No | yesterday | |
| dimensions | No | ||
| propertyId | Yes | GA4 property ID, e.g. '123456789' or 'properties/123456789'. Use ga_list_properties to discover it. | |
| previousEnd | No | 29daysAgo | |
| currentStart | No | 28daysAgo | |
| previousStart | No | 56daysAgo | |
| dimensionFilters | No |