Traffic sources
traffic_sourcesEvery GA4 traffic source for one site, grouped by channel, source and medium, source, medium or campaign, with sessions, share, users, engagement, key events and change against a comparison period. Ranked by sessions, paged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "traffic_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | true returns Google's response exactly as Google sent it, unchanged. | |
| site | No | The site's domain (example.com) or its label. Optional when the account has exactly one site switched on. An unknown name returns an error that lists the switched on sites. | |
| offset | No | Row to start from, for the next page. Default 0. | |
| period | No | Date range. Default last_28_days. Named ranges end when the data is complete. | |
| compare | No | What to compare with. Default previous_period (same length, right before). | |
| end_date | No | Custom end date YYYY-MM-DD. | |
| group_by | No | ||
| page_size | No | Rows per page, default 1000, max 5000. Every row is available through paging. | |
| start_date | No | Custom start date YYYY-MM-DD. Overrides period. |