Analytics
Read a client’s clicks across all their links, for a dashboard or report in your app.
Request#
GET /api/analytics with ?days= or ?from=&to= (Unix seconds), and ?link_id= for one link:
curl "https://api.yourbrand.com/api/analytics?days=30" -H 'Authorization: Bearer nl_live_…' Answer#
Same shape as link stats, without link:
{ "data": { "from": 1794744135, "to": 1795348936, "clicks": 0, "visitors": 0, "bots_and_other": 1, "conversions": 0, "conversion_value": 0, "by_day": [], "top_links": [], "countries": [], "devices": [], "referrers": [] } } | Field | Meaning |
|---|---|
clicks, visitors | Clicks from people, and different people |
bots_and_other | Everything that wasn’t a person |
conversions, conversion_value | Conversions and their total value |
by_day | Clicks per day |
top_links | The client’s most clicked links |
countries, devices, referrers | Top lists, people only |
Examples#
# The last 7 days
curl "$BASE/api/analytics?days=7" -H "Authorization: Bearer $KEY"
# A calendar month (Unix seconds)
curl "$BASE/api/analytics?from=1793491200&to=1796083199" -H "Authorization: Bearer $KEY" For every click one by one, a partner can use the clicks feed.


