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 v3.4.2, and above. 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.

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. In fact, if you’re an average user, this plugin isn’t meant for you at all. 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 raw server (Apache, Tomcat, whatever) 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

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.

4 Responses to “WordPress Plugin: Unique Visitors”

  1. Amrita

    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

    Reply
  2. richard

    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!

    Reply
  3. James Sandberg

    This is exactly what I have been looking for… I find Google analytics is not all that reliable on unique users as it double counts. thanks for this Richard.

    Reply


Leave a Reply

  • (will not be published)