-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Currently, the visits table only stores basic request data (IP, URL, user agent, …).
Problem:
For analytics use cases (dashboards, reporting, geolocation heatmaps), developers need to repeatedly call a GeoIP service on stored IPs, which adds overhead and can return different results over time.
Proposal:
Add an optional geo_raw JSON column to visits where developers can store GeoIP information (country, region, city, lat/lng).
Why JSON?
- Flexible: accommodates different providers (MaxMind, ip-api, ipstack, …).
- Minimal schema change: only one nullable column.
- Future-proof: new fields can be stored without migrations.
- Optional: disabled by default.
Example content:
{
"country_code": "FR",
"country_name": "France",
"region_name": "Île-de-France",
"city_name": "Paris",
"latitude": 48.8566,
"longitude": 2.3522
} Use cases:
- Aggregate visits by country, region, or city directly in SQL.
- Render geographic dashboards (Leaflet, Chart.js, …).
- Store provider-specific data without schema changes.
Metadata
Metadata
Assignees
Labels
No labels