Analytics

Every metric Belcard tracks — event types, geographic data, deduplication, history limits, and export.

Where to find analytics

Go to Dashboard → Analytics. The page shows all-time totals at the top, a daily bar chart for the last 7 days, a top countries breakdown, and a top links breakdown. All data is queried live from Cloudflare D1 on each page load.

The Overview page (/dashboard) also shows 30-day totals with percentage deltas in the four stat cards.

Event types

EventWhen it firesWhere tracked
nfc_tapProfile URL opened with ?nfc=1 — a physical card tap.Server-side, in the [username].astro page handler via waitUntil.
profile_viewYour profile page loads, regardless of how the visitor arrived.Server-side, same handler. Every page load = one event, subject to dedup.
link_clickA visitor clicks one of your links.Client-side via navigator.sendBeacon to /api/analytics/track. Navigation is never delayed.
card_shareA visitor uses the share button on your profile page.Client-side beacon.
contact_saveA visitor downloads your .vcf contact card.Client-side beacon.

Tap vs view — what's the difference?

NFC Taps are only counted when someone physically taps your card (URL contains ?nfc=1). Profile Views count every page load including digital link shares. Taps are always ≤ views. The gap between the two tells you how much of your traffic is digital vs physical.

History limits

PlanAnalytics retention
Free free7 days rolling window
Pro pro90 days rolling window
Lifetime proUnlimited — all events kept
ℹ️ If you downgrade from Pro to Free, events older than 7 days are archived (not deleted). They're restored in full if you re-subscribe.

Geographic data

Belcard runs on Cloudflare's edge network. Cloudflare enriches each request with:

  • cf-ipcountry — ISO 3166-1 alpha-2 country code (e.g. NP)
  • cf-ipcity — City name (e.g. Kathmandu)
  • cf-iplat / cf-iplon — Coarse lat/lon (stored only to ±0.5° precision)

We store country code and city only. Raw IP addresses are never stored. Geographic data is approximate and based on IP geolocation — not GPS.

Session deduplication

To prevent the same person inflating your counts by tapping repeatedly, we compute a coarse session hash: SHA-256(ip + userAgent + calendarDate). This hash is stored with each event. Events with the same hash on the same day are counted as one unique session in aggregate queries.

We never store the raw IP or user agent string — only the one-way hash. The hash cannot be reversed to identify an individual.

Dashboard charts

The Last 7 days bar chart shows daily NFC tap counts. Each bar represents one calendar day. Hover over a bar to see the exact count.

The Top countries card shows the 5 countries with the most events, displayed as horizontal progress bars relative to the top country. The Top links card does the same for your clicked links, ordered by click count.

Data export pro

Pro and Lifetime members can export analytics data as a CSV from Dashboard → Analytics → Export. Exports include: event type, device type, country code, city, and Unix timestamp for all events in the selected date range.

The same data is available via the Analytics API for programmatic access.

Privacy

  • No raw IP addresses stored.
  • No cookies set on visitor browsers.
  • No third-party tracking scripts on any Belcard page.
  • Session hashes use SHA-256 — not reversible to identify individuals.
  • Visitors are not profiled across sessions or across different Belcard users.