Skip to main content

Analytics

Read clicks for one link or for your whole account. Bot clicks are counted apart and left out of the breakdowns.

How far back you can read​

Each plan has an analytics window. Any days value you send is cut to fit it.

PlanWindow
Free30 days
Pro1 year
Growth3 years
EnterpriseNo limit
GET/api/links/{link_id}/analytics
Auth
API key or session · analytics:read
Plan
All plans

Totals, a daily trend and the top countries, devices, referrers and browsers for one link.

Query parameters​

NameTypeRequiredDescription
daysintegerNo1–3650. Only count the last N days, and compare them with the N days before. Without it: everything in your plan's window, compared with nothing.
curl "https://api.linklane.io/api/links/6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10/analytics?days=7" \
-H "Authorization: Bearer $LINKLANE_API_KEY"
Response · 200 OK (trimmed)
{
"range_days": 7,
"totals": {
"clicks": 412,
"unique_clicks": 377,
"bot_clicks": 9,
"qr_scans": 38,
"unique_referrers": 6,
"countries": 11,
"conversions": 21,
"conversion_value": 1049.5,
"conversion_rate": 5.6
},
"previous": { "clicks": 298, "unique_clicks": 270, "conversions": 14 },
"trend": [{ "date": "2026-11-24", "clicks": 51, "unique": 47 }],
"by_country": [{ "name": "US", "value": 190 }],
"by_device": [{ "name": "Mobile", "value": 260 }],
"by_referrer": [{ "name": "Direct", "value": 140 }],
"by_browser": [{ "name": "Chrome", "value": 201 }],
"recent": [],
"truncated": false
}
KeyDescription
linkThe link object.
totalsCounts for the range. conversion_rate is conversions per 100 unique clicks.
previousThe same counts for the range before, or null without days.
trendOne entry per day: date, clicks, unique.
by_country, by_referrerTop 10, as { name, value }.
by_device, by_browserAll values, as { name, value }.
recentThe 25 latest click events.
truncatedtrue if the range held more than 10,000 events and only the newest were read.

Click heatmap​

GET/api/links/{link_id}/heatmap
Auth
API key or session · analytics:read
Plan
Pro and above

Clicks by weekday and hour, for spotting when your audience clicks. Takes the same days parameter. Days run from 0 (Monday) to 6 (Sunday); hours are UTC.

Response · 200 OK (trimmed)
{
"cells": [{ "day": 0, "hour": 9, "count": 14 }],
"max": 31
}

cells always has 168 entries, one per weekday and hour.

Export click events​

GET/api/links/{link_id}/events.csv
Auth
API key or session · analytics:read
Plan
Pro and above

Downloads raw click events as CSV, newest first, up to 50,000 rows within your plan's window.

curl -o clicks.csv \
https://api.linklane.io/api/links/6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10/events.csv \
-H "Authorization: Bearer $LINKLANE_API_KEY"
clicks.csv
timestamp,code,device,os,browser,country,referrer,source
2026-11-30T09:58:40.117000+00:00,spring-sale,Mobile,iOS,Safari,US,instagram.com,link
2026-11-30T09:41:02.360000+00:00,spring-sale,Desktop,macOS,Chrome,GB,Direct,qr

source is qr for scans of the link's QR code and link for everything else.

Account overview​

GET/api/stats/overview
Auth
API key or session · analytics:read
Plan
All plans

A small summary for a dashboard tile: how many links you have, lifetime clicks, and clicks for each of the last 14 days.

Response · 200 OK (trimmed)
{
"links": 86,
"clicks": 20413,
"trend": [{ "date": "2026-11-17", "clicks": 640 }]
}

Account analytics​

GET/api/stats/analytics
Auth
API key or session · analytics:read
Plan
Pro and above

Breakdowns across every link in your workspace.

Query parameters​

NameTypeRequiredDescription
daysintegerNoWindow in days. Default 30. Cut to your plan's window.
Response · 200 OK (trimmed)
{
"days": 30,
"totals": {
"links": 86,
"clicks": 20413,
"window_clicks": 3120,
"unique_clicks": 2804,
"bot_clicks": 51,
"qr_scans": 410,
"countries": 34,
"referrers": 19
},
"trend": [{ "date": "2026-11-01", "clicks": 96, "unique": 88 }],
"by_country": [{ "name": "US", "value": 1400 }],
"by_os": [{ "name": "iOS", "value": 1210 }],
"top_links": [{ "id": "6f1c2b9e-…", "code": "spring-sale", "url": "https://shop.example.com/spring", "clicks": 1284 }]
}

clicks is lifetime. window_clicks is the last days. It also returns by_device, by_referrer and by_browser.

Movers​

GET/api/stats/insights
Auth
API key or session · analytics:read
Plan
Pro and above

Compares the last days (1–30, default 7) with the days before, and lists up to 6 links that changed most. Links with fewer than 5 clicks across both ranges are left out.

Response · 200 OK
{
"days": 7,
"headline": "Clicks up 18.0% vs the prior 7 days.",
"account": { "current": 3120, "prior": 2644, "pct": 18.0, "direction": "up" },
"movers": [
{ "id": "6f1c2b9e-…", "code": "spring-sale", "current": 412, "prior": 298, "delta": 114, "pct": 38.3, "direction": "up" }
]
}

Live click feed​

GET/api/links/{link_id}/feed
Auth
Dashboard session only
Plan
Pro and above

A Server-Sent Events stream of clicks as they happen. The app's live feed uses it. Each message is one non-bot click:

data: {"code":"spring-sale","country":"US","device":"Mobile","referrer":"instagram.com","variant":null,"ts":"2026-11-30T09:58:40.117000+00:00","is_unique":true}

To get clicks on your own server, use a webhook instead.

Recent activity​

GET/api/stats/activity
Auth
Dashboard session only
Plan
All plans

The app's activity list: new links, new campaigns and recent clicks. limit is 1–50, default 20.

Public stats page​

GET/api/public/s/{token}
Auth
No auth
Plan
All plans

The data behind a link's public stats page. It works only when the owner turned on Public stats for the link. The token is the link's share_token. It returns totals, a 30-day trend and the top countries, devices and referrers. It never returns owner data.

Response · 200 OK (trimmed)
{
"white_label": false,
"link": { "code": "spring-sale", "url": "https://shop.example.com/spring", "title": "Spring sale" },
"totals": { "clicks": 1284, "unique_clicks": 1101, "countries": 23 },
"trend": [{ "date": "2026-11-01", "clicks": 40 }],
"by_country": [{ "name": "US", "value": 610 }]
}