Get Google Analytics report
get_analytics_reportQuery the project's connected Google Analytics 4 property: sessions, users, engagement, key events (conversions) and revenue, broken down by channel, source, landing page, page, device, country or date, with optional period-over-period comparison. This is what happens after the click — use it to see which traffic actually converts, explain traffic drops, and back recommendations with business outcomes. Pair with get_search_console_performance for the before-click half, or use get_landing_page_performance to get both joined per page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | Pagination offset. | |
| endDate | No | Explicit end (YYYY-MM-DD, property time zone). Use with startDate. | |
| filters | No | AND-combined. Organic only: [{dimension:'sessionDefaultChannelGroup',operator:'equals',expression:'Organic Search'}]. | |
| metrics | No | Default ['sessions']. keyEvents are the conversions the site owner marked (leads, calls, purchases); totalRevenue needs ecommerce tracking. | |
| orderBy | No | Sort rows by this metric, descending (default the first metric). | |
| rowLimit | No | Rows per call (default 100, max 1000). Paginate with offset when hasMore is true. | |
| compareTo | No | Add a comparison window. Each metric then gets <metric>_previous and <metric>_change (relative, -0.25 = down 25%). Use previous_period to explain a traffic drop, previous_year to strip out seasonality. | |
| dateRange | No | Convenience window ending yesterday (default last_28_days). Ignored if startDate+endDate are given. | |
| projectId | Yes | Required. The HarborRank project ID to scope this call to. Get one from list_projects. | |
| startDate | No | Explicit start (YYYY-MM-DD, property time zone). Use with endDate. | |
| dimensions | No | Break rows down by these. Omit for site totals. ['sessionDefaultChannelGroup'] for channel mix, ['landingPage'] for entry pages, ['date'] for a trend, ['sessionSourceMedium'] for referrers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| meta | No | ||
| rows | No | ||
| reason | No | ||
| endDate | No | ||
| hasMore | No | ||
| rowCount | No | ||
| startDate | No | ||
| connectUrl | No | ||
| nextOffset | No | ||
| propertyId | No | ||
| dataQuality | No | ||
| propertyName | No | ||
| totalRowCount | No | ||
| compareEndDate | No | ||
| compareStartDate | No |