Is it possible to obtain data on what searches have been performed through the front end of a Craft website?

e.g. If there is a search results page which runs

{% set results = craft.entries.search(query) %}

is that the query data stored anywhere? It would be helpful in terms of understanding what kinds of search terms / keywords people are using to search for information.

  • Great question! It's actually a dupe thought... craftcms.stackexchange.com/q/4557/45
    – Lindsey D
    Feb 29, 2016 at 17:45
  • Aw maaan - totally didn't come across that question when searching! Which.. is ironic, given the nature of the question! Thanks though ;)
    – Mike Vaux
    Mar 1, 2016 at 9:33

1 Answer 1


You could use tracking tools like Google Analytics for this? Otherwise create a plugin that creates entries that keep track of whatever query were used.


  • The suggestion re. Google Analytics is good, but the answer on the marked duplicate question is a much more complete and helpful version, so I am assuming that I shouldn't mark this as the answer to my question? Happy to be disagreed with! :) The idea re. creating entries which keep track of queries used is interesting, but it doesn't feel like a great solution to be honest, as an entry doesn't really feel like the right place to house data, and isn't something we can use (inc sharing with clients) in a clean way. Again, happy to be disagreed with!
    – Mike Vaux
    Mar 1, 2016 at 10:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.