Skip to content

[Feature]: Add link click analytics with geographic and device breakdown #345

Description

@divyanshim27

Summary

Conn has a basic click tracking system (POST /api/u/:username/links/:id/click), but the analytics dashboard currently shows only total click counts with no breakdown by device type, geographic region, or referrer source. For a product competing with Linktree — whose core value proposition is analytics — this is a significant functional gap. The roadmap itself lists "Detailed geographic analytics" as a planned item, confirming it is intended.

Problem

  • The /api/u/:username/links/:id/click endpoint records a click but does not capture any metadata about the visitor.
  • The dashboard only surfaces total click counts, with no time-series trend, device split, or geo data.
  • Users cannot identify which of their audiences are engaging, from what devices, or from what platforms (Instagram, Twitter, etc.).
  • Without referrer tracking, users cannot optimize their social media strategy based on data.

Proposed Solution

Backend — enrich the click event schema:

// Supabase click_events table additions
ip_country: text,
ip_region: text,
device_type: text,   // 'mobile' | 'tablet' | 'desktop'
browser: text,
referrer: text,
user_agent: text,
clicked_at: timestamp

Backend — update click handler to extract metadata:

const ua = req.headers['user-agent'];
const referrer = req.headers['referer'] || 'direct';
const deviceType = /mobile/i.test(ua) ? 'mobile' : /tablet/i.test(ua) ? 'tablet' : 'desktop';
// IP → country via ipapi.co or similar free API

Frontend dashboard additions:

  • Time-series chart (clicks over last 7/30/90 days) using Chart.js or Recharts.
  • Device breakdown doughnut chart (mobile / tablet / desktop %).
  • Top referrers table (Instagram, Twitter, Direct, etc.).
  • Geographic map or country list with click counts.

I would like to implement this feature. Please assign this issue to me.

Labels: enhancement, feature, help wanted, GSSoC 2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions