WordPress Plugin: Unique Visitors

The Unique Visitors plugin allow you to identify specific anonymous repeat visitors. It adds a globally unique ID to an image tag that is visible in server logs. This cookie-based ID is also made available for other plugins to use with a simple function call. The plugin does not compile visitor statistics, and there are no plans to add the functionality.

Requirements

The Unique Visitors plugin works with WordPress v2.8.4. It was originally developed for WordPress v2.02, but the simple plugin has worked perfectly with every subsequent version without needed modification and is expected to work with any future version, including the upcoming WP v2.9.

No other plugins are required to function, although you may want to create a wrapper plugin to extract anything useful. It is not necessary to configure the plugin or edit your templates.

Installation

  1. Create a new /unique-visitors/ folder in the /wp-content/plugins/ folder.
  2. Copy all of the files in the zip archive into the new /wp-content/plugins/unique-visitors/ folder.
  3. Activate the plugin in the WordPress Plugin Admin panel.
  4. Installation complete!

Usage

For the average user, there’s nothing to do. No other plugins are required. It is not necessary to configure the plugin or edit your templates. The only thing you’ll notice is that your server logs will have new lines like the following:

/wp-content/plugins/unique-visitors/spacer.gif?2c2f0b6bdddb88540b38e525094376a0
/wp-content/plugins/unique-visitors/spacer.gif?74b6f37dab1db92681ed0286468149c1
/wp-content/plugins/unique-visitors/spacer.gif?32f83c5b453e878496029761dcc7ca4
/wp-content/plugins/unique-visitors/spacer.gif?70cd54924d15293aee0f0652dc143758

WordPress plugin developers might also find all sorts of creative ways to use the globally unique identifier, available with the get_unique_visitors_id function. Example usage (not that you’d normally print it out!):

<?php echo get_unique_visitors_id(); ?>

gives you a nice long unique identifier like this: 2c2f0b6bdddb88540b38e525094376a0

Revision History

Version Release Date Description
v0.99 2006-06-30 Initial release.
v1.00 2006-08-11 Add empty ALT atttributes to image for XHTML compliance.
v1.01 2008-03-02 Added image and made it's home relative to the plugin folder. Added get_unique_visitor_id function. Minor changes in anticipation of WP v2.5.

This plugin is provided as-is, without any warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose. In no event shall I be liable for any special, incidental, consequential or indirect damages of any kind, or any damages whatsoever resulting from loss of; use, data or profits, whether or not advised of the possibility of damage, and on any theory of liability, arising out of or in connection with the use or performance of this plugin.

Comments

3 Responses to “WordPress Plugin: Unique Visitors”

  1. Response #1
    Amrita (IP) on July 12th, 2009 at 10:08 am

    Hello,

    I installed the plugin/ but your above tutorial does not tell at all from where to view the Unique visitor stats??

    Also the plugin does not clarify that?
    Can you explain how do we view the unique visitor number stat and where?>
    I am surprised at your half hearted tutorial above

  2. Response #2
    richard on October 17th, 2009 at 10:18 am

    Sorry, I thought “It adds a globally unique ID to an image tag that is visible in server logs” pretty much covered those questions. The plugin does not provide any statistics, and I have no current plans to add the ability. I will edit the description to reflect that.

    Some history: this plugin was developed to help me track visits from someone stalking my family from an AOL account with dynamic IP addresses. Raw server logs are better evidence to submit to the FBI than compiled stats from a plugin.

    Thanks for the feedback!

  3. Response #3
    mratajczak (IP) on January 29th, 2010 at 5:06 am

    Hi,

    Can You help me with unique visitors counter, visible on my wordpress page?
    Answer at my email.

    Regards,
    MR

Contribute to the Conversation: