I am working on register local search terms in Sitecore DMS. I took help from the following blog. First of all I registered a Search page Event with named "Search".
protected void RegisterSearchPageEvent(string searchQuery)
{
if (!Tracker.IsActive || Tracker.Visitor == null || Tracker.Visitor.CurrentVisit == null)
return;
var page = Tracker.Visitor.CurrentVisit.CurrentPage;
if (Tracker.Visitor.CurrentVisit.PreviousPage != null)
page = Tracker.Visitor.CurrentVisit.PreviousPage;
page.Register(new PageEventData("Search")
{
Data = searchQuery,
DataKey = searchQuery.ToLowerInvariant(),
Text = searchQuery
});
}
I also defined the page event “Search” in Sitecore. Now to display the Report in Executive Dashboard
I went under the "Site Search" but it does not display anything.
I configured the .config file located here:
\sitecore\shell\Applications\Reports\Dashboard\Configuration.config
Here there is a setting called “MinimumVisitsFilter“. I set it from 50 to 5 and also entered the search keywords - more than 50 times. The main point is here is that the above code is inserting the keyword into the Analytics database. Is there any SQL Query problem for Executive Dashboard
?
The above problem is due to browser cache. Sitecore DMS Search event stores the single value for one word if we don't close the browser or need to search from the different browser to store the value. If this kind of problem occurs, then search for different keywords by closing the browser and then clearing the cache. This works for me.