WordPress Geotrack Plugin (2.0.2)

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

2.0-beta 2-5:

  • 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 it here!


  1. Download the plugin
  2. Unpack the zip and upload the files into your WordPress plugins directory <your wordpress directory>/wp-content/plugins. It should look like this:
    + plugins
    – + wp_geotrack.php
    – + wp_geotrack
  3. 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
  4. 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)
  5. 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
that page:

  • [wp-geotrack-list]
    will display a list of recent visitors of your blog
  • [wp-geotrack-googlemap]
    will display a Google Map and highlight the recent visitors of you blog
  • [wp-geotrack-topsites]
    will display a list of your most visited pages
  • [wp-geotrack-topreferrers]
    will display a list of referring sites

2. Use the following functions directly in a templatte:

echo wp_geotrack_display();
echo wp_geotrack_googlemap();
echo wp_geotrack_topsites();
echo wp_geotrack_topreferrers();

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
your blog.

You can get:

  • country
  • country_code (2-letter ISO code)
  • city
  • latitude
  • longitude
  • 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.

269 Antworten Subscribe to comments

  1. Robot

    I have installed this plugin and have not been able to get it working.

    I get a 404 error after I click on the „Update Options“ button in the wp_geotrack settings page: „/wp-admin/options-general.php?page=wp_geotrack.php“

    Any idea what this could be? All of the files are in the proper folders. /wp-content/plugins/wp_geotrack.php has been CHMOD to 755

    10.06.2009 @ 23:25

  2. Robot

    I forgot to mention – Your plugin is v2.0.2, WP is v2.7.1, MySQL is v5.0, php is v5.2.9

    10.06.2009 @ 23:34

  3. Denis

    You might want to assign write privileges to WP through your website’s back end like cPanel. CHMOD 755 is for the file itself, but can WP write on your server? The mistake could be linked to just that: I am pretty sure I had the same problem, and I had to talk to my hosting provider.

    11.06.2009 @ 18:22

  4. LoneShark

    So after the recent reinstall of the plugin my map was missing after a few hits to the site. I followed Christian Nelson’s advice in post #241 and deleted all the geotrack database tables and the map has started to reappear. Unfortunately after a few hits to the site the map disappears again.

    Any ideas of how to fix this issue for good?

    15.06.2009 @ 18:18

  5. Denis

    @ LoneShark

    Check the error log in Firefox, and see which location is causing the problem. For a while hits from Chisinau, Moldova were killing the plug-in on my site. It seems to be working alright now as GeoLite people have obviously edited their database.

    So if that is the problem, go to MySQL and delete the rows in the Geotrack’s database that are related to the troubled IP addresses killing your plug-in.

    13.07.2009 @ 05:34

  6. Todd

    Hi, thank you for the plugin. I an using wordpress 2.8.2 running on Centos 5.2. The plugin is working fine, I only have a small issue which is annoying. The popup in the map looks like its white text on a white background, so I cant see the name of the city, only the flag.

    I confirmed it is an issue with the theme I am using as if I change the theme I can see the text. But I cant seem to see which font/style it is using so I can change it in my css for the theme I use. Can anyoen shed any light on this ??


    27.07.2009 @ 16:15

  7. Kartenkunde, GPS, Routen verfolgung und einiges mehr « Muckels Tagebuch

    […] WordPress Geotrack Plugin […]

    01.09.2009 @ 22:46

  8. Quickie Visitors Country WP Plugin | ... coding (the life)

    […] plugin is dependent on WP/GeoTrack by Johannes Lietz, this is NOT a stand-alone plugin, it won’t work if […]

    27.10.2009 @ 03:15

  9. Dave


    Installed the plugin; everything went fine. Love it. Displays fine on the ‚Visitors & Locations‘ page, however, after some time (4-5 hrs.), the number of visits causes the map to disappear for some reason. If I empty the tables, all is well again. Obviously, this is not an acceptable fix.

    Site is: davewolf.net (Click on ‚Visitors & Locations‘ page)

    I’m wondering if anyone else has seen this behavior and has some way to easily fix or correct it.

    Please comment or feel free to email me (admin that is).


    — Dave

    25.02.2010 @ 15:52

  10. Bernd Eichinger

    wow, nice plugin

    helped me a lot

    thanksssssss !!!

    23.04.2010 @ 14:31

  11. Another day, another plugin · A Mind @ Play

    […] WP/GeoTrack – Neat little plugin which provides the output shown on the Visitors page. […]

    03.05.2010 @ 11:52

  12. Bill Bird

    These instructions just might have well have been written in German. Perhaps they should have been — cause I might have understood them.

    Der Johannes, do you perchance have instructions for idiots like myself? I’m proud to admit that yes, indeed, I am an idiot.

    I’d love to have this app on the blog though.

    I need something simple though like:

    1. Get source code here.
    2. Copy source code.
    3. Paste Source code here and name application
    4. Pour yourself a stiff gin drink.

    The gin instructions are especially important Johannes.


    17.06.2010 @ 14:23

  13. Wordpress: Blog – Besucher auf Google Map anzeigen | blogbox.ch

    […] dem “WordPress Geotrack Plugin” kannst Du Dir  die Herkunft der Besucher  auf Deinem Blog anzeigen lassen. Hier auf meinem […]

    20.06.2010 @ 19:43

  14. MusicAl

    The plugin looks great, Thanks for your efforts. Is this plugin compatible to WordPress 3.0?

    16.07.2010 @ 14:35

  15. Bloggeotagging: be spatially enabled blogger | sharkofagus

    […] Mulai dari tracking lokasi asal pengunjung dan memvisualisasikannya dalam peta: IP City Cluster, WordPress Geotrack, WP GuestMap, Visitors Map Generator, ClustrMaps, Whos Amung Us; menampilkan GoogleMaps di dalam […]

    17.09.2010 @ 12:56

  16. wingman

    The plugin works really well. I have it installed on version 3.0.1. Issue so far:

    1)unable to install the Geo Ip database so I had to manually upload it

    2)When checking for „plugin update“ I am getting an „error“

    Keep up the good work!

    26.10.2010 @ 21:25

  17. Windy Stlawrence

    Been looking at doing site optimization and improving the web design on my site for a long time, so this post has been very useful. Easy read also, so thank you!

    12.12.2010 @ 21:40

  18. Webdesign Kassel

    Hello, im looking for any updates of this plugin, can you help me please?

    29.04.2011 @ 08:02

  19. Simonne Eggleston

    Have you ever thought about including a little bit more than just your articles? I mean, what you say is fundamental and everything. But just imagine if you added some great pictures or video clips to give your posts more, „pop“! Your content is excellent but with pics and video clips, this blog could certainly be one of the best in its niche. Good blog!

    07.06.2011 @ 05:18