What it does
Top UTM source/medium/campaign combinations. Attribution metric — counts direct browser visits only ('user' class). AI-mediated traffic loses original UTM tags so it would only add noise.
Example prompts
Ask:
"Which UTM source brought the most visits to mysite.com last month?"
"Top traffic sources by campaign, last 90 days."
"How did the spring_launch campaign actually perform?"
A typical response:
Top sources (last 30 days):
newsletter weekly spring_launch 1,847 visits
twitter social (none) 612 visits
google cpc search_brand 487 visits
reddit social (none) 302 visits
google cpc search_generic 224 visits
podcast referral dev_tools_pod 174 visits
hackernews referral (none) 142 visits
newsletter weekly summer_promo 102 visits
(none) organic (none) 89 visits
Returns groups of { utm_source, utm_medium, utm_campaign, visits }.
Useful for evaluating whether a specific UTM-tagged campaign actually
delivered, or for spotting that your newsletter is your highest-quality
referral source.
Attribution metric: direct browser visits only.
AI-mediated traffic loses original UTM tags entirely (an AI fetching a
page doesn't preserve the user's original UTM-tagged click), so
including it would add noise without signal. See
traffic_class_breakdown
for the per-class breakdown.
For deeper attribution: combine with
event_details grouped
by utm_source property to see which sources are driving
your custom conversion events, not just pageviews.
Arguments
| Name | Type | Required | Description / Default |
|---|---|---|---|
site_id |
string | required | Site identifier from list_sites (8-character base32, e.g. 'wjxayhdd'). |
period |
string | optional |
Time window. Keywords: today, yesterday, last_7_days, last_30_days, last_90_days, last_12_months. Or a custom date range YYYY-MM-DD..YYYY-MM-DD (inclusive).
default: last_7_days
|
limit |
integer | optional |
Maximum number of rows to return. Capped at 1000 server-side.
default: 10
|
How to call it directly
If you're integrating from your own code rather than a chat client, this is the JSON-RPC payload:
curl -X POST https://mcp-analytics.com/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "top_sources",
"arguments": {
"site_id": "abc12345"
}
}
}'
Token comes from /settings after you sign up. Replace any required arguments above.
Related tools
color_scheme_breakdown: Share of visitors with prefers-color-scheme: dark vs light.regenerate_api_token: Invalidate the current API token and issue a new one.remove_site: Soft-delete a site.list_sites: List all sites on the authenticated account.list_events: All event names with counts (includes 'pageview' and custom events).