There is a lite free version of this country level location database which is updated each quarter by MaxMind, but if you have an account with them you can also grab the full version.
To add the database:
1. Download the full version of your MaxMind database country DB by logging into your MaxMind account. You can also download the free lite MaxMind country database here: http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
2. Use WinRAR or similar to extract the file so you get a .mmdb file to upload. If you’re on a MAC then the archiver handles .gz zips just fine.
3. Open the settings page on “Affiliate Links > Settings”.
4. Scroll down until you find the Enable MaxMind DB Integration option, then click the checkbox. An extra input field should show up.
5. Click the Upload New Database button and then upload the .mmdb file you got before.
6. After it’s uploaded correctly, click the File URL button and the link should show up in the Link URL option, just copy it.
7. Click the X button and then paste the link into the newly generated input field (Current DB File In Use).
8. Scroll down and then click Save All Changes button.
Please note that as of version 1.5.0 the add-on will automatically load the free MaxMind lite country DB on activation and use this by default, so loading it again manually is not necessary. If you deactivate/reactivate the plugin and it has been over 1 month since the last time it downloaded the database, it will download and update the database file itself again.