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.
| Plan | Window |
|---|---|
| Free | 30 days |
| Pro | 1 year |
| Growth | 3 years |
| Enterprise | No limit |
Link analytics
Totals, a daily trend and the top countries, devices, referrers and browsers for one link.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | integer | No | 1–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
- JavaScript
- Python
curl "https://api.linklane.io/api/links/6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10/analytics?days=7" \
-H "Authorization: Bearer $LINKLANE_API_KEY"
const id = "6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10";
const res = await fetch(`https://api.linklane.io/api/links/${id}/analytics?days=7`, {
headers: { Authorization: `Bearer ${process.env.LINKLANE_API_KEY}` },
});
const { totals, previous } = await res.json();
console.log(`${totals.clicks} clicks this week, ${previous.clicks} the week before`);
import os
import requests
link_id = "6f1c2b9e-1d4a-4c39-9a51-0c7e8b2d4f10"
res = requests.get(
f"https://api.linklane.io/api/links/{link_id}/analytics",
params={"days": 7},
headers={"Authorization": f"Bearer {os.environ['LINKLANE_API_KEY']}"},
)
data = res.json()
print(data["totals"]["clicks"], "clicks this week")
{
"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
}
| Key | Description |
|---|---|
link | The link object. |
totals | Counts for the range. conversion_rate is conversions per 100 unique clicks. |
previous | The same counts for the range before, or null without days. |
trend | One entry per day: date, clicks, unique. |
by_country, by_referrer | Top 10, as { name, value }. |
by_device, by_browser | All values, as { name, value }. |
recent | The 25 latest click events. |
truncated | true if the range held more than 10,000 events and only the newest were read. |
Click heatmap
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.
{
"cells": [{ "day": 0, "hour": 9, "count": 14 }],
"max": 31
}
cells always has 168 entries, one per weekday and hour.
Export click events
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"
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
A small summary for a dashboard tile: how many links you have, lifetime clicks, and clicks for each of the last 14 days.
{
"links": 86,
"clicks": 20413,
"trend": [{ "date": "2026-11-17", "clicks": 640 }]
}
Account analytics
Breakdowns across every link in your workspace.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | integer | No | Window in days. Default 30. Cut to your plan's window. |
{
"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
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.
{
"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
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
The app's activity list: new links, new campaigns and recent clicks. limit is 1–50, default 20.
Public stats page
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.
{
"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 }]
}