Search analytics

Search analytics

jimbob72jimbob72 Posts: 49Questions: 0Answers: 0
edited July 2011 in General
Is there any way to track the use of the search function (both general and column-specific)? My client wants to be able to tell how many site users have searched for a particular item, or which column search terms/filters people are using most.

I can see a vague way of doing it by capturing the sSearch[] terms from the querystring (i'm using Ajax/server-side processing), but wondered if there was a built-in way of doing it.

Thanks

Replies

  • allanallan Posts: 63,107Questions: 1Answers: 10,394 Site admin
    Its quite a nice idea that - I like it :-). There is no built in mechanism for doing this since DataTables itself is stateless - i.e. reload the page and your modifications are gone (unless of course you have state saving on, but even then...). You would need to store the search parameter that is being used in a database somewhere (a trivial INSERT would do) and then run some analytics over it when needed.

    Allan
  • jimbob72jimbob72 Posts: 49Questions: 0Answers: 0
    edited July 2011
    Thanks Alan. I'll try the insert method and capture each sSearch[] value into a table, plus the user id etc. I've also been looking at Google's trackPageview function which looks like it could be used to log the ajax calls - not quite sure how yet. Will try and figure it out and post the results. It would be nice to incorporate the search data into the wider Google results.

    More info at: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55521
This discussion has been closed.