Skip to main content

How to keep track of searches made on a Joomla! website

| Gianluca Gabella | Joomla!
share on facebook share on twitter share on linkedin


Nowadays, it is very important to know 'what the user is thinking' (and therefore what they are looking for and how they are looking for it!) in order to position yourself better than your competitors. There are ways to track all the searches made by a user within the website made with Joomla!, let's see them together.


The following guide only works with the 'standard' Joomla search method. In case you use external components or specific search plugins this method does not work and needs to be adapted according to your needs. For example, if you use Virtuemart and have installed components such as "Custom Filters", you will have to make some changes to the procedure.

Method 1: use the Joomla core!

Joomla! has a built-in system for tracking searches. The problem is that it is disabled by default. You can find it by going to 'top menu' -> 'components' -> 'search statistics':

statistiche ricerche

The first step is then to enable the statistics, which we can do by clicking on the Options button at the top right.

We now set the first option 'Search Statistics' to 'YES'.

statistiche si

And save by clicking on the 'Save and Close' button.

The end! That was easy, wasn't it? :-)

Now of course the stats will be empty, but if you try to do a search on your site and go back into the component from the backend you will find it listed, with some info on the number of searches and how many results it has produced (but beware: this figure is indicative and not very accurate, because if you have disabled some search systems the number that comes up will be wrong)

ricerca di prova

Method 2: Use Google Analytics

Method 1 just described is considered to be very 'down-to-earth'. It allows you to have statistics that are not too detailed, but it is easy to implement and gives immediate results. However, it is possible to have more detailed statistics and above all integrated with Google Analytics, which is the free Google tool that allows you to collect very useful statistics on the use of your website.

Again, this option is easy to activate but disabled by default. To activate it, the steps are as follows:

If you use the 'old' Universal Analytics

1) Go to your Google Analytics account and click at the bottom left on 'Administration'.

amministrazione google analytics

2) Click on 'View Settings' in the right-hand column:

impostazioni viste

3) Towards the end of the options that open there will be the 'Site Search Settings'. Set this to 'ON' and as 'Search Parameter' put searchword

impostazioni ricerca

Then click on 'Save'. The end!

After 24 hours (there are no real-time statistics on searches) you will already find results by going to the 'site searches' section in the right-hand column

panoramica ricerche

If you use the 'new' Analytics 4

With Analytics 4, the setup is a little different, but not complicated. My advice at the moment, however, is to use both, as they can be set up at the same time.

Always click on 'Administration' at the bottom left:

amministrazione analytics 4

Now click on 'Data Stram' in the options presented to stream

We then click on our property (in most cases there is only one option to click on).

In the Advanced Measurement options there should already be 'site search':

ricerca su sito

Now click on the gear icon on the right. If the 'search on site' option is not enabled click on the on/off button on the right, then click on 'show advanced settings'.

ricerca su sito avanzate

In the field 'additional search parameters' write searchword and then click on 'SAVE' at the top right.searchword

Now we can test whether everything works: click in the left-hand column on the second entry 'Real-time'. Then go to your site and do any search.

If everything is set up properly, you should also find an event "view_search_results" in the "event count" panel. Clicking on it and going to click on "search_term" (if the box is small, you probably have to go to the second page) will bring up the search term:

view search results

search term

After 24 hours you will find all the detailed statistics of the searches made on your Joomla site!

Enjoy stalking your users! :-D

If you liked this article, please share it!

share on facebook share on twitter share on linkedin
condividi su Facebookcondividi su Twittercondividi su LinkedIncondividi su WhatsAppcondividi su Telegram