Search Meter: a WordPress plugin

Saturday, 27 August 2005

Latest version is 2.9, released on 5 September 2012.

Search Meter is a WordPress plugin that helps you keep your blog focused on what your visitors want to read. It does this by keeping track of what your visitors are searching for.

If you have a Search box on your blog, Search Meter automatically records what people are searching for — and whether they are finding what they are looking for. Search Meter’s admin interface shows you what people have been searching for in the last couple of days, and in the last week or month. It also shows you which searches have been unsuccessful. If people search your blog and get no results, they’ll probably go elsewhere. With Search Meter, you’ll be able to find out what people are searching for, and give them what they want by creating new posts on those topics.

Search Meter includes a Dashboard widget so you can see the last week of searches right on your WordPress Dashboard.

You can also show your readers what the most popular searches are. The Popular Searches widget displays a configurable list of recent popular successful search terms on your blog, with each term hyperlinked to the actual search results. There’s also a Recent Searches widget, which simply displays the most recent searches. If you are happy to edit your theme, both of these functions are also available as template tags.

Search Meter installs easily and requires no configuration. Just install it, activate it, and it starts tracking your visitors’ searches. Here’s a screenshot of the Search Meter dashboard, showing some of the reports you’ll get.

Search Meter dashboard

Compatibility

The latest version of Search Meter works with WordPress versions from 2.8 to 3.4.2, and should also work with newer versions as they are released.

Install

Log in to your WordPress administration console. Under Plugins, select Add New. Type Search Meter in the box and the rest should be easy.

You can also download the Search Meter files from the WordPress Plugin Directory. You can download older version of the plugin, or check the development version for the latest unreleased goodies.

View Statistics

To see your search statistics, Log in to WordPress Admin, go to the Dashboard section and click Search Meter. You’ll see the most popular searches in the last day, week and month. Click “Last 100 Searches” or “Last 500 Searches” to see lists of all recent searches.

Manage Statistics

There are a couple of management option available if you go to the Settings section and click Search Meter. Use the Reset Statistics button to clear all past search statistics; Search Meter will immediately start gathering fresh statistics. If you’re technically-minded, you might want to check the “Keep detailed information” checkbox to make Search Meter save technical information about every search (the information is taken from the HTTP headers).

Popular and Recent Searches

The Popular Searches widget displays a list of the most popular successful search terms on your blog during the last 30 days. The Recent Searches widget displays a simple list of the most recent successful search terms. In both cases, the search terms in the lists are hyperlinked to the actual search results; readers can click the search term to show the results for that search. Also, you can configure the title and the maximum number of searches that each widget will display.

To add these widgets to your sidebar, log in to WordPress Admin, go to the Appearance section and click Widgets. You can drag the appropriate widget to the sidebar of your choice, and configure the title and the number of searches to display.

Widget support depends on the version of WordPress and the theme you’re using. In some cases you will not be able to use the widgets. In any case, you can always use the Search Meter template tags to display the same information. You’ll need to edit your theme to use them.

The sm_list_popular_searches() template tag displays a list of the 5 most popular successful search terms on your blog during the last 30 days. Each term is a hyperlink; readers can click the search term to show the results for that search. Here are some examples of using this template tag.

sm_list_popular_searches()
Show a simple list of the 5 most popular recent successful search terms, hyperlinked to the actual search results.

sm_list_popular_searches('<h2>Popular Searches</h2>')
Show the list as above, with the heading “Popular Searches”. If there have been no successful searches, then this tag displays no heading and no list.

sm_list_popular_searches('<li><h2>Popular Searches</h2>', '</li>')
Show the headed list as above; this form of the tag should be used in the default WordPress theme. Put it in the sidebar.php file.

sm_list_popular_searches('<li><h2>Popular Searches</h2>', '</li>', 10)
This is the same as the above, but it shows the 10 most popular searches.

sm_list_recent_searches()
Show a simple list of the 5 most recent successful search terms, hyperlinked to the actual search results. You can also use the same options as for the sm_list_popular_searches tag.

If you add these to your theme, wrap them in a function_exists call so your theme won’t break if you deactivate Search Meter. It should look something like this:

if (function_exists('sm_list_popular_searches')) {
    sm_list_popular_searches();
}

Problems, questions or requests?

If you use the Recent Searches or Popular Searches widgets, you may be affected by a WordPress bug that stops multi-word search links from working.For more information and a way to fix the problem, see my Search Fixer plugin to ensure the search links always work.

Contribute

The source code is maintained on the Search Meter github repository. You know the drill: fork, hack, send a pull request, and bask in the warm glow of satisfaction that is open source.

If you find any problems, please let me know by leaving a comment at the bottom of this page. You can also leave a comment if you have any questions about how it works, or if you would like to request a feature.

I write these WordPress plugins because I enjoy doing it, but it does take up a lot of my time. If you think this plugin is useful, please consider donating some appropriate amount.

Click here to donate using a credit card or PayPal.

Send Bitcoins to address
1542gqyprvQd7gwvtZZ4x25cPeGWVKg45x

Full WordPress plugin list

  • Code Markup — Quickly paste code samples into your posts -- you can even include HTML markup in the code sample.
  • Evermore — Automatically display a short preview of your posts on the home page and other multiple-post pages, along with a link to the full post.
  • FixBack — Ensure trackbacks and pingbacks are sent with the correct link back to your blog.
  • Less — Less is no more. It has been renamed to Seemore and moved to its own Seemore plugin page.
  • Plaintext — Allow your readers to download source files (e.g. PHP, HTML, ASP) as plain text.
  • Safe Title — Use HTML in post titles in the default WordPress theme (or any other theme).
  • Search Meter — Find out what people are searching for on your blog, so you can write what your visitors want to read.
  • Seemore — Change the (more...) link so it jumps to the full post, not just the part after the link.
  • Top Cat — Specify a main category for your posts, and use template tags to display posts differently according to their main category.
Share this page:
  • Twitter
  • Digg
  • Slashdot
  • del.icio.us
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Facebook
  • Print

1,396 comments

You can leave a comment, or trackback from your own site.

  1. Hello,
    I have installed this plugin but it does not work well, the plugin doesn’t show the searches of the users in search meter dashboard and the wigdet does’t show the searches either. I need help, thanks.

  2. How do I show the last 30 days (instead of 7 days) searches in my admin dashboard?

  3. @Chris, edit the file admin.php. Go to lines 185-6, which look like this:
    <h4>Searches in the Last 7 Days</h4>
    <?php tguy_sm_summary_table(7); ?>

    Change the two 7s to 30.

  4. @rm and @Film, you can do this by editing the search-meter.php file in two places:

    On line 96, change AND 0 < `last_hits` to AND true

    On line 120, change WHERE 0 < `hits` to WHERE true

  5. I have the same problem as moises. No results in de dashboard widget, not in the recent search and popular search widget…really nothing. I work with relevanssi plugin to get more search results, and I can see the results there…How can I get also results in Search Meter.. I want to use the widgets frontend.

  6. @Karin, can you tell me what theme you are using and what other plugins apart from Search Meter and Relevanssi?

  7. I have the same problem as moises and karin.
    I have 2 blogs (WordPress 3.4.2.)

    -1: Twenty ten (all is OK)

    -2: Twenty eleven: No results. Plugin doesn’t show the searches of the users

  8. @Bennett. I work with the Genesis framework, Other plugins installed are WooCommerce and WPML, Store-locator-le,, Cookie law info, BackWPup, Custom Field Widget, Various Genesis Plugins, Custom Post Type Editor, Featured Image Widget, Gravity Forms, Kwavyy HTML Sitemap, Lightbox, My Page order, Open in new windows Q and A plus, Redirection, Regenerate thumbnails,
    I have search meter working on another website (without problem) with WooCommerce (and multiple add-ons) and Genesis (with multiple plugins) and Gravity Forms.

  9. For me, problem solved.

  10. Excellent plugin! Thanks much.

  11. Hello,

    Do you know where I could find the same kind of plugin, but I would like to show the search keyword from google ?

    Thx

    Yann

  12. Google Webmaster Tools probably allows you to do this, but I am not aware of a WP plugin version.

  13. başarılı çalışma

  14. Hey Bennett thanks for the plugin that works great.

    I just changed the source code to show the searches as the user sees them instead of in the admin of wordpress:

    changed line 409:
    <a href="terms).’&submit=Search’ ?>”>terms) ?>

    You may want to add a setting for it

  15. I’m using search meter plugin
    and im also using recent & popular search widget…..

    BUT IT NOT SEEMS TO BE WORKING

    EVEN AFTER FEW SUCESSFULL SEARCH ON SEARCH WIDGET,
    NO RECORDS FOUND IN SEARCH METER DASHBOARD, NEITHER
    RECENT AND POPULAR WIDGET DISPLAYING ANYTHING…

    KINDLY HELP ME HOW FIX THE ABOVE PROBLEM……

  16. I’m using search meter + search fixer plugin
    and im also using recent & popular search widget…..

    BUT IT NOT SEEMS TO BE WORKING

    EVEN AFTER FEW SUCESSFULL SEARCH ON SEARCH WIDGET,
    NO RECORDS FOUND IN SEARCH METER DASHBOARD, NEITHER
    RECENT AND POPULAR WIDGET DISPLAYING ANYTHING…

    More info: im using “portfolio” theme version 1.4.1 and using following plugin:- ‘WP Photo Album Plus’,'add link to fb, ‘add meta tags’,'ad injection’,'ad inseter’,'contact us form’,'easy fancy box’,'floating media icon’,'jQuery Vertical Mega Menu’,'Marquee’,'NextGEN Gallery’,'Options Framework’,'Search Fixer’,'Search Meter’,'Tweak Option’,'WP MashSocial Wigdet’

    KINDLY HELP ME HOW FIX THE ABOVE PROBLEM……

  17. Hi Bennett,

    How can i add my custom post type Stat ?

    Thanks,

  18. How does the plugin check, if a search was successful or not? Does successful mean, that someone clicked on a search entry or does it mean, someone stayed on the page for a certain number of seconds?

  19. @Pulkit, I haven’t been able to reproduce your problem, but I am still trying. (Slowly.)

    @Popsantiago, I think it should work with custom post types too, as long as they show up in your searches. If they don’t, you might need to update your theme.

    @web sitesi, successful means that the search returned some results. Unsuccessful means that the search term was not found in the blog.

  20. hi there, nice plugin! but pls tell me how it is possible to show up recent searches not as vertical list. I have a very wide sidebar & vertical ordering is very *space eating* possible to get a other listing output? for xample: searchterm1,searchterm2,searchterm3…. instead of

    searchterm1,
    searchterm2,
    searchterm3

    hope you get my point, thx in advance!

Leave a comment