Skip to main content

Analytics Dashboard

Understand your link performance with comprehensive click tracking and analytics.

Overview

LinkForty's analytics dashboard provides real-time insights into:

  • Click metrics - Total and unique clicks
  • Geographic data - Country, city, region distribution
  • Device breakdown - Mobile, desktop, tablet
  • Platform analysis - iOS, Android, Windows
  • Traffic sources - UTM tracking and referrers
  • Time patterns - Clicks by hour and date
  • Top performers - Best-performing links

Dashboard Views

Organization Overview

View aggregated analytics across all links in your organization.

Access: Dashboard home page or AnalyticsOverview

API Endpoint:

curl "https://api.linkforty.com/api/analytics/overview?days=30" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"

Key Metrics:

  • Total Clicks
  • Unique Visitors
  • Top Performing Links
  • Geographic Distribution
  • Device & Platform Breakdown

Deep-dive into individual link performance.

Access: Click any link → Analytics tab

API Endpoint:

curl "https://api.linkforty.com/api/analytics/links/{linkId}?days=30" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"

See: Link Analytics API Reference

Project Analytics

Aggregate analytics for all links in a project.

Access: Projects → Select project → Analytics tab

API Endpoint:

curl "https://api.linkforty.com/api/analytics/projects/{projectId}?days=30" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"

See: Projects Guide

Time Filtering

All analytics views support custom time ranges.

Available Ranges:

  • Last 24 hours
  • Last 7 days
  • Last 30 days (default)
  • Last 90 days
  • Last 365 days
  • Custom date range

API Parameter:

# Last 7 days
curl "https://api.linkforty.com/api/analytics/overview?days=7"

# Last 90 days
curl "https://api.linkforty.com/api/analytics/overview?days=90"

Analytics Metrics

Click Metrics

Total Clicks: Total number of times your links were clicked

Unique Clicks: Number of unique visitors (deduplicated by IP address)

Click-Through Rate (CTR):

CTR = (Unique Clicks / Total Clicks) × 100

Example:

  • Total Clicks: 1,248
  • Unique Clicks: 892
  • CTR: 71.5%

This indicates 71.5% of clicks came from unique visitors.

Geographic Analytics

By Country:

{
"countryCode": "US",
"country": "United States",
"clicks": 523
}

By City:

{
"city": "New York",
"countryCode": "US",
"region": "NY",
"clicks": 142
}

By Region/State:

{
"region": "California",
"countryCode": "US",
"clicks": 256
}

By Timezone:

{
"timezone": "America/New_York",
"clicks": 312
}

Device & Platform Analytics

Device Type:

  • Mobile - Smartphones
  • Desktop - Laptop and desktop computers
  • Tablet - iPads and Android tablets

Platform:

  • iOS - iPhone, iPad
  • Android - Android phones and tablets
  • Windows - Windows PCs
  • macOS - Mac computers
  • Linux - Linux systems

Browser:

  • Chrome, Safari, Firefox, Edge, etc.

Example:

{
"clicksByDevice": [
{ "device": "mobile", "clicks": 742 },
{ "device": "desktop", "clicks": 398 },
{ "device": "tablet", "clicks": 108 }
],
"clicksByPlatform": [
{ "platform": "iOS", "clicks": 623 },
{ "platform": "Android", "clicks": 425 },
{ "platform": "Windows", "clicks": 200 }
]
}

Traffic Source Analytics

UTM Parameters:

Track campaign performance with UTM parameters.

{
"clicksByUtmSource": [
{ "source": "instagram", "clicks": 523 },
{ "source": "email", "clicks": 312 },
{ "source": "Direct", "clicks": 187 }
],
"clicksByUtmMedium": [
{ "medium": "social", "clicks": 642 },
{ "medium": "email", "clicks": 312 },
{ "medium": "None", "clicks": 187 }
],
"clicksByUtmCampaign": [
{ "campaign": "spring-sale", "clicks": 823 },
{ "campaign": "product-launch", "clicks": 425 }
]
}

Referrer Analysis:

See where traffic is coming from.

{
"clicksByReferrer": [
{ "source": "Instagram", "clicks": 523 },
{ "source": "Facebook", "clicks": 312 },
{ "source": "Direct", "clicks": 187 },
{ "source": "Google", "clicks": 142 }
]
}

Time-Based Analytics

Clicks by Date:

{
"clicksByDate": [
{ "date": "2024-03-15", "clicks": 245 },
{ "date": "2024-03-14", "clicks": 198 },
{ "date": "2024-03-13", "clicks": 223 }
]
}

Clicks by Hour:

{
"clicksByHour": [
{ "hour": 14, "clicks": 145 }, // 2 PM
{ "hour": 15, "clicks": 132 }, // 3 PM
{ "hour": 10, "clicks": 118 } // 10 AM
]
}

Use this to identify peak traffic times.

See which links drive the most traffic.

{
"topLinks": [
{
"id": "link_abc123",
"shortCode": "spring24",
"title": "Spring Sale 2024",
"originalUrl": "https://shop.example.com/sale",
"totalClicks": 1248,
"uniqueClicks": 892
},
{
"id": "link_def456",
"shortCode": "newprod",
"title": "Product Launch",
"originalUrl": "https://shop.example.com/new",
"totalClicks": 823,
"uniqueClicks": 612
}
]
}

Recent Activity

View real-time click stream.

curl "https://api.linkforty.com/api/analytics/recent?limit=20" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"

Response:

[
{
"id": "click_xyz789",
"linkId": "link_abc123",
"shortCode": "spring24",
"linkTitle": "Spring Sale 2024",
"clickedAt": "2024-03-15T14:23:12Z",
"deviceType": "mobile",
"platform": "iOS",
"countryCode": "US",
"city": "New York",
"utmSource": "instagram",
"utmMedium": "social",
"utmCampaign": "spring-sale"
}
]

Data Export

Export raw analytics data for external analysis.

Via Dashboard

  1. Go to AnalyticsOverview
  2. Click "Export" button
  3. Select time range
  4. Choose format (CSV or JSON)
  5. Download file

Via API

curl "https://api.linkforty.com/api/analytics/export?startDate=2024-03-01&endDate=2024-03-31&format=csv&limit=1000" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"

Query Parameters:

  • startDate - Start date (YYYY-MM-DD)
  • endDate - End date (YYYY-MM-DD)
  • linkId - Filter by specific link (optional)
  • format - json or csv (default: json)
  • limit - Max records (default: 1000, max: 10000)
  • offset - Pagination offset

Response (JSON):

{
"data": [
{
"id": "click_1",
"linkId": "link_abc123",
"shortCode": "spring24",
"clickedAt": "2024-03-15T14:23:12Z",
"ipAddress": "192.168.1.1",
"deviceType": "mobile",
"platform": "iOS",
"browser": "Safari",
"countryCode": "US",
"city": "New York",
"utmSource": "instagram",
"utmCampaign": "spring-sale"
}
],
"pagination": {
"total": 5432,
"limit": 1000,
"offset": 0,
"hasMore": true
}
}

Response (CSV):

id,linkId,shortCode,clickedAt,deviceType,platform,countryCode,city,utmSource,utmCampaign
click_1,link_abc123,spring24,2024-03-15T14:23:12Z,mobile,iOS,US,New York,instagram,spring-sale
click_2,link_abc123,spring24,2024-03-15T14:25:03Z,desktop,Windows,CA,Toronto,email,spring-sale

Requires: Member, Admin, or Owner role

TypeScript Examples

1. Display Dashboard Overview

interface AnalyticsOverview {
totalClicks: number;
uniqueClicks: number;
clicksByDate: Array<{ date: string; clicks: number }>;
clicksByCountry: Array<{ countryCode: string; country: string; clicks: number }>;
clicksByDevice: Array<{ device: string; clicks: number }>;
topLinks: Array<{
id: string;
shortCode: string;
title: string;
totalClicks: number;
uniqueClicks: number;
}>;
}

async function getDashboardOverview(days: number = 30): Promise<AnalyticsOverview> {
const response = await fetch(
`https://api.linkforty.com/api/analytics/overview?days=${days}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);

return response.json();
}

// Usage
const overview = await getDashboardOverview(7);

console.log(`📊 Last 7 Days Overview`);
console.log(`Total Clicks: ${overview.totalClicks.toLocaleString()}`);
console.log(`Unique Visitors: ${overview.uniqueClicks.toLocaleString()}`);
console.log(`\n🏆 Top Link: ${overview.topLinks[0].title}`);
console.log(` Clicks: ${overview.topLinks[0].totalClicks.toLocaleString()}`);
console.log(`\n🌍 Top Country: ${overview.clicksByCountry[0].country}`);
console.log(` Clicks: ${overview.clicksByCountry[0].clicks.toLocaleString()}`);

2. Calculate Growth Rate

async function calculateGrowthRate() {
const thisWeek = await fetch(
'https://api.linkforty.com/api/analytics/overview?days=7',
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());

const lastWeek = await fetch(
'https://api.linkforty.com/api/analytics/overview?days=14',
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());

const thisWeekClicks = thisWeek.totalClicks;
const lastWeekClicks = lastWeek.totalClicks - thisWeekClicks;

const growth = ((thisWeekClicks - lastWeekClicks) / lastWeekClicks) * 100;

return {
thisWeek: thisWeekClicks,
lastWeek: lastWeekClicks,
growth: growth.toFixed(1) + '%',
isGrowing: growth > 0,
trend: growth > 0 ? '📈 Growing' : '📉 Declining',
};
}

// Usage
const growth = await calculateGrowthRate();
console.log(`This week: ${growth.thisWeek} clicks`);
console.log(`Last week: ${growth.lastWeek} clicks`);
console.log(`Growth: ${growth.growth} ${growth.trend}`);

3. Export and Analyze Data

async function exportAndAnalyze(startDate: string, endDate: string) {
const response = await fetch(
`https://api.linkforty.com/api/analytics/export?startDate=${startDate}&endDate=${endDate}&format=json&limit=10000`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);

const { data, pagination } = await response.json();

// Analyze mobile vs desktop
const mobile = data.filter(click => click.deviceType === 'mobile').length;
const desktop = data.filter(click => click.deviceType === 'desktop').length;
const mobilePercentage = ((mobile / data.length) * 100).toFixed(1);

// Find peak hour
const hourCounts = data.reduce((acc, click) => {
const hour = new Date(click.clickedAt).getHours();
acc[hour] = (acc[hour] || 0) + 1;
return acc;
}, {} as Record<number, number>);

const peakHour = Object.entries(hourCounts)
.sort((a, b) => b[1] - a[1])[0];

return {
totalRecords: data.length,
mobilePercentage: mobilePercentage + '%',
desktopPercentage: ((desktop / data.length) * 100).toFixed(1) + '%',
peakHour: `${peakHour[0]}:00 (${peakHour[1]} clicks)`,
hasMore: pagination.hasMore,
};
}

4. Track Campaign Performance

interface CampaignMetrics {
campaign: string;
clicks: number;
uniqueClicks: number;
countries: number;
mobilePercentage: string;
}

async function getCampaignMetrics(linkId: string): Promise<CampaignMetrics> {
const analytics = await fetch(
`https://api.linkforty.com/api/analytics/links/${linkId}?days=30`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());

const link = await fetch(
`https://api.linkforty.com/api/links/${linkId}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());

const mobileClicks = analytics.clicksByDevice.find(d => d.device === 'mobile')?.clicks || 0;
const mobilePercentage = ((mobileClicks / analytics.totalClicks) * 100).toFixed(1);

return {
campaign: link.title || link.shortCode,
clicks: analytics.totalClicks,
uniqueClicks: analytics.uniqueClicks,
countries: analytics.clicksByCountry.length,
mobilePercentage: mobilePercentage + '%',
};
}

// Usage
const metrics = await getCampaignMetrics('link_abc123');
console.table([metrics]);

5. Generate Weekly Report

async function generateWeeklyReport() {
const overview = await getDashboardOverview(7);

const report = {
period: 'Last 7 Days',
summary: {
totalClicks: overview.totalClicks,
uniqueVisitors: overview.uniqueClicks,
avgClicksPerDay: (overview.totalClicks / 7).toFixed(1),
},
geographic: {
topCountry: overview.clicksByCountry[0],
countriesReached: overview.clicksByCountry.length,
},
devices: {
mobile: overview.clicksByDevice.find(d => d.device === 'mobile')?.clicks || 0,
desktop: overview.clicksByDevice.find(d => d.device === 'desktop')?.clicks || 0,
tablet: overview.clicksByDevice.find(d => d.device === 'tablet')?.clicks || 0,
},
topPerformers: overview.topLinks.slice(0, 5).map(link => ({
title: link.title,
clicks: link.totalClicks,
shortCode: link.shortCode,
})),
};

console.log(JSON.stringify(report, null, 2));

return report;
}

Understanding Your Data

What is a "Unique Click"?

A unique click is deduplicated by IP address. If the same IP clicks your link 5 times, it counts as:

  • Total Clicks: 5
  • Unique Clicks: 1

Note: This is an approximation. Multiple users behind the same router/proxy will share an IP.

Why do some clicks show "Unknown"?

Geographic data:

  • VPN users hide their location
  • Some IPs aren't in geolocation databases
  • Privacy-focused browsers block location tracking

Device/Platform data:

  • Rare or custom user-agents
  • Browsers that spoof user-agent strings
  • Bots and automated traffic

How accurate is geolocation?

Country: ~95% accurate City: ~70% accurate Coordinates: ~80% accurate

Accuracy depends on IP geolocation database quality. Mobile users on cellular networks may show as neighboring cities.

What counts as a "click"?

A click is logged when:

  1. User visits your short link
  2. Request reaches LinkForty servers
  3. User is redirected to destination

Not counted:

  • Bots (filtered by user-agent)
  • Prefetch requests from browsers
  • Failed requests (404, errors)

Best Practices

1. Review Analytics Regularly

Recommended Schedule:

  • Daily: Check recent activity and top links
  • Weekly: Review growth trends and campaign performance
  • Monthly: Export data and analyze patterns

2. Use UTM Parameters

Track campaign sources properly:

curl -X POST https://api.linkforty.com/api/links \
-d '{
"originalUrl": "https://shop.com/sale",
"utmParameters": {
"source": "instagram",
"medium": "social",
"campaign": "spring-sale",
"content": "story-1"
}
}'

See: UTM Parameters Guide

3. Set Up Projects

Organize links by campaign for better analytics:

Project: Spring Sale 2024
├── Instagram Story Link
├── Email Newsletter Link
├── Facebook Ad Link
└── Twitter Post Link

See: Projects Guide

If you notice unexpected geographic distribution:

  • ✅ Check for bot traffic
  • ✅ Verify campaign targeting
  • ✅ Look for viral sharing patterns

5. Optimize for Peak Hours

Use "Clicks by Hour" data to schedule:

  • Email sends
  • Social media posts
  • Ad campaigns

Troubleshooting

"No analytics data"

Possible causes:

  • Link hasn't been clicked yet
  • Time filter too narrow (try 30 days)
  • Link created very recently

Fix:

  1. Share link to generate clicks
  2. Expand time range
  3. Wait 1-2 minutes for data processing

Analytics seem delayed

Cause: Analytics update in near real-time (1-2 minute delay)

Fix: Refresh dashboard after a minute

Duplicate clicks showing

Cause: Same user clicking multiple times

Solution: Use "Unique Clicks" metric instead of "Total Clicks"

Geographic data missing

Cause: VPNs, proxies, or missing IP data

Expected: 5-10% of clicks may have unknown location

Next Steps

  1. Review your current analytics
  2. Set up UTM tracking for campaigns
  3. Organize links into projects
  4. Export data for external analysis
  5. Schedule regular analytics reviews