GA4 period comparison
ga_compare_periodsCompare GA4 metrics for current and previous periods by dimension, including per-row and total deltas and percent changes, to see how traffic changed versus last month.
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' (see ga_list_properties). | |
| filterLogic | No | How to join several dimensionFilters. | and |
| previousEnd | No | 29daysAgo | |
| currentStart | No | 28daysAgo | |
| metricFilters | No | AND-ed metric filters (post-aggregation). | |
| previousStart | No | 56daysAgo | |
| dimensionFilter | No | Raw FilterExpression; overrides dimensionFilters. | |
| dimensionFilters | No |