GET /v1/sources
GET /v1/sources — top sources/mediums with the FB social-vs-paid split.
Top sources (and optionally source × medium) for the project. This is the endpoint that surfaces the Facebook social-vs-paid split.
Auth
Required scope
read
Key kinds
rk_*
Request
GET /v1/sources?from=…&to=…&breakdown=source_medium
Authorization: Bearer rk_live_…Query parameters
from
yes
ISO 8601 timestamp (inclusive).
to
yes
ISO 8601 timestamp (exclusive).
breakdown
no
source_medium (default) or source.
limit
no
1–200, default 50.
Response
{
"breakdown": "source_medium",
"rows": [
{ "source": "facebook", "medium": "paid", "events": 6, "uniques": 6, "paid_share": 1.0 },
{ "source": "facebook", "medium": "social", "events": 3, "uniques": 3, "paid_share": 0.0 },
{ "source": "google", "medium": "paid", "events": 3, "uniques": 3, "paid_share": 1.0 },
{ "source": "direct", "medium": "direct", "events": 7, "uniques": 7, "paid_share": 0.0 }
]
}Each row:
events— total events matching the breakdown.uniques— distinctanonymous_ids (HyperLogLog estimate).paid_share—count(medium='paid') / count(*)for the row. Forbreakdown=source_mediumit's trivially 0 or 1; forbreakdown=sourceit reveals what fraction of a source's traffic is paid (useful for "X% of our Facebook is paid").
Examples
"What's our Facebook social vs paid split this month?"
"Where does our traffic come from, ignoring paid/organic?"
Related
For more flexible aggregations, use
/v1/statswithgroup_by=source,medium.For session-level entry source (better for revenue attribution), query
sessions_vdirectly.
Last updated
Was this helpful?