There are multiple ways of making the statistics work, there are helper functions that will do basically everything for you given you have the correct kind of search and so on.
However, the more manual way is:
SearchClient.Instance.Statistics().TrackQuery(…);
SearchClient.Instance.Statistics().TrackHit(…);
You could either add add some attributes on the search result links and have a script call something that does the tracking, adding something to the url of the search results and looking for that on the next page, or go via some page that does the tracking and then redirects. You might want to filter out known bots and such when doing the tracking as well.
The code above is quite Googleable (or Bingable if you will).
Hi
Usually I see your scenario if there are no statistics data available, which could be:
Depending on how search was implemented on your site, it can be easy (with Unified Search) or hard (with custom loading and presenting of content) to implement tracking. See https://docs.developers.optimizely.com/digital-experience-platform/v1.1.0-search-and-navigation/docs/tracking
Hello.
the Statistics does not seem to be working. Here is the details (sorry can't insert an image nor a link due to some limitations):
at the "localhost:5000 / EPiServer / Find / #manage" (as well as on our DEV server) instead of the expected graph, we have the following:
Page layout looks OK, the graph area is in place;
vertical axis: empty;
horizontal axis: has a scale of 24 positions, obviously hours. Each scale has a green "half-dot" right at the axis. Nothing else.
"Search without hits" has the very same thing but the "half-dots" are yellowish.
Same picture for several days, as I started looking at that a few days ago.
Where to look / how to fix it?
Version 12.
I am new to Optimizely and still learning. I would appretiate any data flow diagram that explains the communications between the components.
Thank you -
-mb