get_traffic_sources
Retrieve breakdown of website traffic by source (organic, direct, referral, etc.) from Google Analytics 4 for a specified property and date range.
Instructions
Get traffic breakdown by source (organic, direct, referral, etc.)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"propertyId": "<propertyId>",
"startDate": "<startDate>",
"endDate": "<endDate>"
},
"name": "get_traffic_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | Yes | End date in YYYY-MM-DD format | |
| startDate | Yes | Start date in YYYY-MM-DD format | |
| propertyId | Yes | GA4 Property ID |