Track Wordpress internal Search

Hello together

Is it possible to track the wordpress internal search with piwik ?
So, that I can see what my visitors search for in my blog.

Regards,
Jeffrey

Depending on how you have your site set up, if you haven’t changed anything (and the template isn’t changing anything) you could try adding a goal that tracks URLs with “?s=” in it.

Of course, this won’t extract the search strings necessarily, but it’s pretty easy to see from the URL.

Thanks for your help!
I tried it but it did not work. It shows me after creating the Goal just the Keywords of the Google Search.

Have you another idea ?

Ok, what about a “contains” search with your website being “yourwebsite.com

I’m sure this would work.

I tried this before, but it did not work style_emoticons/<#EMO_DIR#>/sad.gif

both did not work:

"Visit a given URL"
Contains
www.yourwebsite.com/?s=

"Click on a Link to an external website"
Contains
www.yourwebsite.com/?s=

Have you another idea ?

Ok, I see what I was doing wrong. Here’s how I ended up setting the goal:

  • Goal is triggered when visitors visit a given URL
  • Where URL contains
http://www.yourwebsite.com/index.php?s=

But, all this really does is set a goal, it won’t give you what the users are searching for.

What you COULD check is for the Title of your pages. So make them stand out for searches. You can do this by changing your “TItle” code in your header.php file to be similar to the following (which is mine):

    <title>
        <?php 
            if(is_single()) {
                wp_title('', true);
                echo ' : ';
                bloginfo('name');
            } elseif(is_category()) {
                wp_title('');
                echo ' : ';
                bloginfo('title');
            } elseif (is_search()) {
                echo 'Search Results: ';
                echo $s;
                /* bloginfo('name'); */
            } else{
                bloginfo('title');
                wp_title();
            }
        ?>
    </title>

Then, all your “search results” will have titles starting with "Search Results: " and anything after that is what was actually searched for.

Make sense?

You can see my title for a search result here:

www.geniosity.co.za/index.php?s=geniosity

Great, it works!
Thank you for your help style_emoticons/<#EMO_DIR#>/smile.gif

p.s. we have an open ticket to add this. http://dev.piwik.org/trac/ticket/49

It is now possible to track internal searches on your websites, with Piwik Site Search Analytics available as of Piwik 1.9.

You can even track “No Result Keywords” and Search categories if your website supports it. It also lists the pages most clicked on search results.