Developer forum

Forum » Ecommerce - Standard features » Search Index Analytics - Finding out what people are searching for and results

Search Index Analytics - Finding out what people are searching for and results

Jon Thorne
Jon Thorne
Reply

Hi,

Does anyone know if it is possible to log and view the statistics on what people are searching for in the products search and what searches produce no results? Is there anything avialable for that or is it something that I would need to create?

Regards,

Jon.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

On the apps using lucene you can track queries.

TrackQueries is a setting on the Product Catalog (and the underlying Query Publisher module) that, when true, logs each executed index query — including the free-text search term and result count — into Dynamicweb's Tracking subsystem so it can be analyzed later. It requires that tracking is enabled.

When enabled, it builds EventData records:

  • One Indexing.Query event — EntityType="Query", key = query name (the .query file path), sub-key/query string = the request querystring (this is where the free-text search term lands, since the search box value is a request parameter), Value = result count.
  • One Indexing.Query.Parameter event per query parameter (EntityType="QueryParameter"), one per value for multi-valued parameters.

These are passed to Tracker.Current.TrackEvent(...), and if there's a page view it also tracks a view.

4. Where the data gets stored adds the events to the tracking context; on request execution they're flushed via the repository to a SQL table named TrackingEvent Relevant columns:

Column

Holds

TrackingEventName

"Indexing.Query" / "Indexing.Query.Parameter"

TrackingEventEntityType

"Query" / "QueryParameter"

TrackingEventEntityKey

query name (or parameter name) — the search term / querystring is here

TrackingEventEntitySubKey

parameter value

TrackingEventValue

result count

TrackingEventTimestamp, TrackingEventSessionId, TrackingEventViewId

when / session / view

 

But there is currently no report. You can do
SELECT TOP 10
    TrackingEventEntitySubKey   AS SearchTerm,
    COUNT(*)                    AS ZeroResultSearches
FROM [TrackingEvent]
WHERE TrackingEventName       = 'Indexing.Query.Parameter'
  AND TrackingEventEntityKey  = 'q'
  AND TrackingEventValue      = 0
GROUP BY TrackingEventEntitySubKey
ORDER BY ZeroResultSearches DESC;

 

You must be logged in to post in the forum