In order to know the location of the visits your website received before you started using Piwik with GeoIP you need to run a command.
The reference to this command is at: //piwik.org/faq/how-to/faq_167/
Unfortunately after having logged in as root in the server this command gave me the following error:
Could not open input file: ./console
After doing research and using my own Linux experience here is a(the?) solution:
# Make temporarily the www-data user login possible
usermod -s /bin/bash www-data
# Login as www-data
sudo su - www-data
# Change the htdocs directory to the installed Piwik.
# Run the command
php ./console usercountry:attribute 2012-01-01,2013-01-01
Re-attribution for date range: 2012-01-01 to 2013-01-01. 0 visits to process with provider "ip2location".
Completed. Time elapsed: 0.819s
# Get out of www-data user login and back to root login
# Prevent back login of the user www-data(as it was originally)
usermod -s /usr/sbin/nologin www-data
In the command given you need to give the exact date range (eg. 2012-01-01,2017-11-01) which needs to be evaluated in your Piwick reports.