Compare GA4 periods
ga4_compare_periodsDiff the last N days vs the prior N days. Day over day, WoW, MoM, etc.
Both windows are N calendar days in the property's time zone and do not overlap. The current one ends today, and today is still filling in, so a short window (days=1 is today vs yesterday) reads low until the day is over.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | window size (default 28 -> 28 vs prior 28; 7 for WoW; 1 for today vs yesterday) | |
| limit | No | max dimension rows in the diff (default 20) | |
| metric | No | GA4 metric to compare (default "sessions"; try "activeUsers", "screenPageViews", "conversions", "totalRevenue") | sessions |
| property_id | Yes | GA4 property id | |
| by_dimension | No | dimension to slice the comparison by, or None for totals only. Common: "sessionDefaultChannelGroup", "country", "deviceCategory", "pagePath" | sessionDefaultChannelGroup |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||