We use GeoIP which is the same location recording technology most sites use, and it's not perfect. It's dependent on each country, peoples' browser settings, ISP, and a host of other things. Sometimes it will display city if it can, and should do that about 85% of the time, but sometimes it doesn't.
One company measures the accuracy of their own GeoIP database, which can server as a good comparison for GeoIP in general. You can view that here: https://www.maxmind.com/en/geoip2-city-database-accuracy and an example of their table is below: