Back to Engineering Blog
Growth & Privacy6 min read•

Precise City and Country Link Tracking: How to See Where Your Clicks Actually Come From

Traditional shorteners only show the country where a user clicked. Here is how edge infrastructure headers reveal exact city-level hotspots with zero cookies and zero third-party tracking scripts.

M

Maya Lin

Digital Campaign Producer

Why Country-Level Analytics Leave You in the Dark

Imagine launching a promotional campaign for a new software release or e-commerce sale. Your analytics dashboard shows 1,500 clicks from the United States, 600 from the United Kingdom, and 400 from Japan.

On the surface, that looks like good engagement. But critical questions remain unanswered:

  • Did your US traffic come from New York finance professionals, Silicon Valley engineers, or Austin startups?
  • Did your UK traffic cluster in London or spread across Manchester and Edinburgh?
  • What time zone should you schedule your follow-up email blast to hit peak morning attention in those specific cities?
  • Traditional link shorteners give you only 2-letter country codes like US, GB, or JP. They omit city data because third-party IP geolocation APIs charge expensive monthly lookup fees.

    How Edge Infrastructure Solves the Geolocation Problem

    Modern content delivery networks like Cloudflare and Vercel inspect incoming traffic right at the edge, milliseconds before the request reaches the application server.

    During this initial TCP handshake, the edge router attaches standardized geolocation headers to the request:

    GET /launch HTTP/2
    Host: tlink.bond
    x-vercel-ip-city: New%20York
    x-vercel-ip-country: US
    x-vercel-ip-country-region: NY
    cf-ipcity: Tokyo
    cf-ipcountry: JP

    Because this lookup occurs at the network routing layer:

  • **Zero External API Cost:** The lookup is already calculated by the CDN edge.
  • **Sub-Millisecond Resolution:** The application server reads the city directly from memory without making slow external HTTP queries.
  • **No Visitor Cookies:** The city is derived strictly from routing topology, so no persistent tracking cookies or invasive device fingerprinting are required.
  • 4 Real-World Playbooks for City-Level Analytics

    1. Localize Digital Ad Spend

    If you run Meta or Google Ads targeting an entire nation, inspecting which cities generate the highest organic click density allows you to narrow your budget to top-performing metro areas. This frequently reduces cost per acquisition by 20% to 35%.

    2. Align Broadcast Timing with Local Peak Hours

    Audience engagement follows local schedules. A visitor in London checks social feeds at 8:00 AM GMT (midnight Pacific), while a visitor in Tokyo engages during afternoon commutes. Knowing your top cities lets you schedule link shares during active local windows.

    3. Detect Viral Regional Surges Early

    When a podcast host mentions your product or a local creator shares your link, traffic spikes in a specific metro area before spreading nationally. Real-time city tracking alerts you to viral surges within minutes, giving your marketing team time to engage the community while momentum is high.

    4. Combine Dynamic Routing with Geographic Intelligence

    By pairing city-level telemetry with header-based geo-routing, you can automatically send visitors from different regions to localized store pages or regional landing pages with zero manual redirects.

    Precision Without Privacy Compromise

    With TLink, every shortened link tracks both city and country automatically. You get the deep geographic insights needed to make informed marketing decisions while respecting your audience's privacy.

    Tags:#Geo Analytics#City Tracking#Edge Computing#Campaign Optimization

    Try TLink Free Today

    Sub-100ms redirects, 50/50 A/B split routing, and lossless vector QR codes. 100% free forever.