Open eliasyishak opened 7 months ago
http://ip-api.com/json seems to be a promising but we may not be permitted to use it... from the home page, "Free for non-commercial use"
https://ipregistry.co/ another alternative but this has a cost... and with us having this package be open-source, we would have to expose our API key publicly.. likely not a good option
https://freeipapi.com/ this alternative seems to be free and doesn't require an API key. Website also says it is permitted for commercial use
Simply running curl https://freeipapi.com/api/json/8.8.8.8
returns json for that IP endpoint
{
"ipVersion": 4,
"ipAddress": "8.8.8.8",
"latitude": 37.386051,
"longitude": -122.083847,
"countryName": "United States of America",
"countryCode": "US",
"timeZone": "-08:00",
"zipCode": "94035",
"cityName": "Mountain View",
"regionName": "California",
"isProxy": false,
"continent": "Americas",
"continentCode": "AM"
}
GA4 does not behave like GA3, we should have a mechanism for resolving geolocation data within the package if GA4 is unable to support this feature