Wordpress From Where
WP-From/Where is a brand new Wordpress 1.5 compatible plugin that logs search engine traffic to your site and displays a list of clickable keywords that people have used to get to your site! For example, on this post about homeless photography, I’ve gotten visitors from the following keywords:

Download:
You can get the latest version of this plugin from its repository page. You can also download the file directly.
Installation:
To install this plugin, simply upload wp-from-where to your wp-content/plugins/ and activate in the admin interface. It’s a one-click install!
Usage:
After the plugin is installed, it will begin logging records immediately. However, to display them, you’ll need to call a defined function. For example, in my sidebar.php file, I have the following:
<?php if(is_single()) { ?>
<div class="line"></div>
<h3><?php _e('You Came From'); ?></h3>
<ul>
<?php wp_from_where
(true, 'DESC', 20, '<li>', '</li>', '') ?>
</ul>
<?php } ?>
You need a call to wp_head(); somewhere in your header.php file for it to log to the db properly. The function wp_from_where takes the following arguments:
- boolean $per_post, true if you want to display these per_post, false if you want a total across all posts.
- enum $sort = (’ASC’, ‘DESC’), defaults to ‘DESC’ to list highest hit-rate keywords first.
- int $limit, defaults to showing 10 items at a time.
- string $before, defaults to the blank string, prepends each item.
- string $after, defaults to the blank string, appends each item.
- string $sep, defaults to a space-comma, goes in between each item.
Update:
The latest version indexes both the post_id and the keyword for much better performance. I have about 25,000 items in my production db right now, and my blog was becoming uncommonly slow. With the new index, everything’s back to normal! Why, you wonder? The queries match both post_id and keyword per user hit, which, as you can imagine, is quite a bit. Now we should be scalable again.
This entry was posted on Saturday, July 23rd, 2005 at 8:47 pm and is tagged with search engine traffic, homeless photography, div class, blank string, admin interface, time string, h3, quot, comma, desc, lt, wp, repository, indexes, sidebar, logs, queries, ul, blog. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

Add New Comment
Viewing 10 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)
4/18/2006 at 4:39 pm
[...] Not long ago, I complained that my referrers list had sold out and I was on the hunt for ...
4/21/2006 at 6:24 am
[...] Faz algum tempo instalei neste blog um plug-in chamado "WP From / Where"1, que identifica através de quais palavras ...
6/18/2006 at 9:48 am
[...] Mit dem Wordpress-Plugin von Elliott Back sieht man bei den einzelnen Posts, wo bzw. wie der Eintrag gefunden wurde. ...
12/31/2007 at 3:35 am
[...] WordPress from/where elenca le parole chiave tramite cui gli utenti approdano alle tue pagine [...]
1/3/2008 at 1:51 pm
[...] Mit dem Wordpress-Plugin von Elliott Back sieht man bei den einzelnen Posts, wo bzw. wie der Eintrag gefunden (Google) ...