Tracking the website Visitors' Location or approximate location can be useful for multiple reasons: you can run localized campaigns on your site, target specific cities and countries with your ads based on your data, display different content on some pages, or add multiple languages to your site.
Visitor Geolocation is quite self-explanatory, as it refers to the locations or approximate locations of your website visitors. There are a couple of ways to track this: either via an HTML5 feature using a geolocation API (Application Programme Interface) or via IP lookup.
The Geolocation API works like a pop-up, asking visitors if they agree to share their location, and if the answer is yes, then the site admin will receive the coordinates. If the answer is no, then no visitor location is provided.
IP lookup is the most common way to track visitor geolocation - most IPs are public, hence, there are lots of IP location providers on the web. By using a provider, you can easily see where the IP was last registered. The downside of this is that sometimes, the IP provider does not update the info, so, if an IP was newly assigned, there are is a high chance it will still have its old location.
For obvious security reasons, there are a lot of analytics tools that will not provide the exact location, though. Google is cross tracking data, so because they know what you Google, the videos you watch on YouTube, what is in your Gmail inbox and what ads you click, they do not provide the exact location within analytics tools. It would be too revealing, but the info can be used for targeting reasons within the ads service. Other tools add an algorithm to the received location in order to add a few km radius. So, you will not see the exact street and number of your visitors, but you will seebthe visitor a few km away from their location (usually, this means the same neighborhood). This is still a piece of very accurate information and more than enough to help you set up proper targeting in your ads or on your site.
When a person visits a website, their computer, smartphone or other type of device exchanges information with the website's server. Each web page is made up of multiple files, and the server transmits each one of these files to the user’s browser. From this type of data, traffic can be monitored on the website's homepage and all the other webpages, and also on segments of the site. This way, analytics tools determine exactly how many visitors each segment receives.
There are multiple ways to use the number of visitors by geolocation. There are 3 types of metrics to look at: