This is a new updated version (2.0.2) of my WordPress GeoIP and Geo-Tracking / Geo-Location plugin!
I encourage everybody to install this new version because it has some important improvements over the 1.0!
- Fixed some installation Problems which could cause “white screen” PHP errors directly after activation
- many bugfixes
- plugin checks installation of geo-database (could break your site completely before!)
- updated referrer-spam blacklist
- improved overall perfomance! lots of visitors could really slow your website down.
- new options-page in your wordpress admin, no PHP skills needed any more.
- new IP blocking of known referrer spammers.
- new top-10-lists of referrers, visited pages, visitors’ countries and visitors’ cities.
- fixed an installer bug when installing the plugin with non-standard wordpress table prefixes.
- logs every visit on your wordpress blog in your MySQL database
- automatic cleanup of logs in your MySQL database
- contains the same information as Apache combined server logs with ip, referrer, method, status, uri, user agent and access time
- additionally stores geo-ip information with country, ISO country code, city name, latitude and longitude
- displays a list of current visitors
- displays a top-10-list of referrers, visited pages, visitors’ countries and visitors’ cities
- has functionality to prevent referrer spamming
- ip blocking of known referrer spammers
- contains a set of free (GNU-GPL / Creative Commons) country flags from Wikipedia
- Google maps integration: shows your visitors’ locations on world map
- fast geoip retrieval through local database
- contains installer and update scripts
- uses MaxMind GeoLite City
- see it in action here
- and of course it’s free to use!
- Download the plugin
- Unpack the zip and upload the files into your WordPress plugins directory <your wordpress directory>/wp-content/plugins. It should look like this:
– + wp_geotrack.php
– + wp_geotrack
- Activate the plugin: Go to your WordPress admin’s plugin page (e.g.
http://www.example.com/wordpress/wp-admin/plugins.php) and activate the
- Get your Google map key: If you want to use the Google map, you will have to get your own map key at:
(Google Account required)
- Configure the plugin: In your wordpress admin go to Options -> WP-Geotrack Plugin
- on the bottom of the page click “Install/Update MySQL Database Tables”
- click “Install/Update Geo-IP Database”. This will download and unpack a new copy of the MaxMind geo-database. This will take some time, so please be patient untill it is finished
- set the plugins options (e.g. Google map key) and click “Update options”
Use the plugin:
You have two options to use the plugin:
1. Create a new page (or post) in WordPress, and enter the following tags into
will display a list of recent visitors of your blog
will display a Google Map and highlight the recent visitors of you blog
will display a list of your most visited pages
will display a list of referring sites
2. Use the following functions directly in a templatte:
3. The $_SESSION ist filled with all available user details. E.g. you can use
<?php echo $_SESSION['gt_data']['country']; ?> to display the user’s country in
You can get:
- country_code (2-letter ISO code)
- uri (the current uri)
- referrer (if any)
Some more information can be found in the README.txt.
The plugin can also be found in it’s Subversion directory on svn.wp-plugins.org.