Elliott C. Back: In Aere Aedificare

Wordpress From Where

Posted in Blogging, Code, Plugins by Elliott Back on July 23rd, 2005.

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:

Wordpress From Where

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:

  1. boolean $per_post, true if you want to display these per_post, false if you want a total across all posts.
  2. enum $sort = (’ASC’, ‘DESC’), defaults to ‘DESC’ to list highest hit-rate keywords first.
  3. int $limit, defaults to showing 10 items at a time.
  4. string $before, defaults to the blank string, prepends each item.
  5. string $after, defaults to the blank string, appends each item.
  6. 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.

15 Responses to 'Wordpress From Where'

  1. Julian said:

    on August 9th, 2005 at 3:11 am

    Wouldn’t it be cool to have the information which is collected by the plugin displayed in the admin section of wordpress? In the dashboard for example, so that you can see the latest keywords.

  2. Jason said:

    on October 25th, 2005 at 8:30 am

    Having trouble installing since my WP theme doesn’t have a sidebar.php
    so where should I cut and paste the call a defined function code ?

    Thanks!

  3. Alek said:

    on November 28th, 2005 at 7:57 pm

    hmm, this is interesting actually. we need a few more seo tools for wordpress like this one. but i must admit, i would also rather use it via the dashboard instead of making it public like this.

    can anyone give any pointers as to where one can insert the above code to get it to display admin-side?

    thanks for the work so far!

  4. Elliot said:

    on March 13th, 2006 at 1:18 am

    The repository is down. Do you have a mirror?

  5. Meredith said:

    on April 18th, 2006 at 8:55 am

    Alek: Perhaps put it on a password-protected WP-page?

  6. Ha! Sidebar at Blog-Her said:

    on April 18th, 2006 at 4:39 pm

    […] Not long ago, I complained that my referrers list had sold out and I was on the hunt for a new referrer thingie. Well, I found a good’un in the form of a Wordpress plugin called From/Where. I’m going to give it some time to work to see if I like it or not. It looks promising though! […]

  7. Bruxismo » Os visitantes Onanistas said:

    on April 21st, 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 chaves digitadas no Google, o visitante chegou até aqui. As informações são apresentadas na barra direita, no campo “You Came From” quando o post é visto isoladamente. Até ai tudo bem, eu sempre acompanhava a visita do pessoal e sabia qual o principal assunto procurado no blog através desses termos. […]

  8. jakob said:

    on May 27th, 2006 at 5:58 pm

    hey

    does the plugin work on pages or only posts ?

    rgds
    jakob

    www.boyco.dk

  9. schimana.net » From where? said:

    on June 18th, 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. Tags: google, intern, wordpress […]

  10. mr nice ash said:

    on July 20th, 2006 at 9:52 am

    hey elliott, i wanna have a copy but it seems that the download page is not available anymore.

  11. Lautreamont said:

    on July 24th, 2006 at 12:55 pm

    Still, I don’t see the point in doing that. I mean, what does it have to do with your content.

  12. JJ Rage said:

    on December 5th, 2007 at 4:56 am

    Hello, i searched Google for internship programs and found your Wordpress blog.

    Sheesh, a lot of internship programs are like glorified secreterial positions, take it from someone who’s been there and did that. Paid internships are few and far between as i’m sure you may already know. Something that helped me was a program called College Works Painting. Basicly they select students and train them to run home painting crews. Of course they earn money, but they get some pretty good hands on experience at business leadership. Its pretty much seasonal, but i know several college students who were having financial problems that were helped by this program during warmer months. If you know a student, or are still a student, google the term College Works Painting and check out their website.

  13. » I migliori plugin per WordPress …secondo me | DoZ-log | said:

    on December 31st, 2007 at 3:35 am

    […] WordPress from/where elenca le parole chiave tramite cui gli utenti approdano alle tue pagine […]

  14. Wordpress Plugin - From Where » Tom Schimana – Weblog said:

    on January 3rd, 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) wurde. Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können. […]

  15. Geena said:

    on March 5th, 2008 at 3:44 pm

    Please, can you help? The plugin doesn’t record any arrival! (you can check it at my site)
    Maybe it’s because I’m using global translator?
    :(

Your Thoughts Go Here:

Powered by WP Hashcash