Empty "Most frequent searches" - where to look / how to fix?

Vote:
 

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

#305495
Edited, Jul 21, 2023 19:29
Quan Mai - Jul 24, 2023 6:00
You can upload your screenshot to imgur and then post the link here
Quan Mai - Jul 24, 2023 6:01
also anything in the browser console ?
Vote:
 

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:

  1. When someone makes a search:
  2. SearchClient.Instance.Statistics().TrackQuery(…);
  3. When someone clicks on a link in the search result:
    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).

#305628
Jul 24, 2023 12:29
Vote:
 

Hi

Usually I see your scenario if there are no statistics data available, which could be:

  1. No-one searched for anything in those days, or
  2. Tracking of searches are not implemented (or is not working)

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

#305631
Jul 24, 2023 15:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.