Geo-IP describes the assignment of an IP address to the geographical location of a connection. Using this technology, geotargeting in the framework of an advert can be controlled, and the origin of the visitor can be determined.
As soon as a computer connects to the Internet, it is assigned an IP address by its provider's server. The first octet of an IPv4-based address then provides the indication of the server location in a particular country.
As soon as a user accesses the internet via a fixed broadband Internet connection with DSL, the corresponding dial-in code or the last access point is transmitted via the IP address in addition to the server location.
The Geo-IP is one of several ways to determine a user's location. Other options include GPS data from mobile devices as well as wifi data. Using HTML5 the user location can be determined more precisely via the browser. 
As soon as a user visits a website, their IP address is transmitted. Therefore, when geolocation tools are used, they rely on a large database of many thousands of IP addresses as well as their respective locations for individual octets. Modern tools should deliver accuracy of over 90 percent.
IP-based location determination is never 100 percent accurate. For this reason, errors can be expected when services or web content are targeted to the user's location. For example, users may use proxy servers to surf the internet, or their provider's main servers may be located in a different country than their computer location. In these two cases, the IP address cannot be assigned to the actual location of the user, in which case there would be no advantage to this analysis.
Another element of criticism is that some users do not want the website to be aware of their location. Therefore, it is important to have an opt-in so that the user can expressly agree whether the website may use their location. This practice is mostly applied to current HMTL5 geolocations.
Geo-IP is useful for web analytics to map visitors to a site to a specific country, region or city. On the basis of this data, on the one hand, more accurate sales evaluations can be made. On the other hand, the Geo-IP provides important information for regional targeting in advertising campaigns.