Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Searches without relevant hits

Vote:
 

I have a Find implementation with tracking applied. It seems to work since both the queries and the clicked hits are displayed in the admin UI under "Most frequent queries". However under "Searches without relevant hits" all the queries are listed with a 0% click-rate. I would understand this if the click-tracking wasn't working, but the JavaScript seems to fire correctly and the clicks shows up under each query in the "Most frequent queries"-list.

Is there some additional step that needs to be made in order to get the data for relevant hits displayed correctly?

#143747
Jan 29, 2016 14:17
Vote:
 

Check out the guide

http://dmytroduk.com/techblog/statistics-tracking-in-episerver-find

and see if you missed a step. Strange that you get parts of it working...

#143748
Jan 29, 2016 14:40
Vote:
 

Did you add the .Track() extension to your query for example?

#143749
Jan 29, 2016 14:41
Vote:
 

Thanks for the reply!

I'm doing a multi-search (the same query but with separate resultsets depending on additional parameters) and therefore track the query manually:

  var tags = ServiceLocator.Current.GetInstance<IStatisticTagsHelper>().GetTags().ToList();

  _trackingId = new TrackContext().Id;

  SearchClient.Instance.Statistics().TrackQuery(_trackingQuery, x =>
            {
                x.Id = _trackingId;
                x.Tags = tags;
                x.Query.Hits = totalNumberOfHits;
            });

..and apply the querystring values also manually:

  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_id", HttpUtility.UrlEncode(_trackingId));
  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_q", HttpUtility.UrlEncode(_trackingQuery));
  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_tags", HttpUtility.UrlEncode(_trackingTags));
  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_ip", _trackingIP);
  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_hit.id", string.Format("{0}/{1}", hit.Type, hit.Id));
  searchHit.Url = searchHit.Url.AppendQueryStringParameter("_t_hit.pos", position.ToString());

I've compared the manually generated querystring with one automatically generated from a tracked unified query and they seem to match.

Comparing with the three screenshots from the site, I see clicks like for the search phrase "plan", but in my case "plan" is also displayed under "Searches without relevant hits" with 0% click-rate.

#143751
Edited, Jan 29, 2016 15:07
Vote:
 

Ok and you've of course checked that your parameter with totalNumberOfHits isn't 0 I guess?

#143760
Jan 29, 2016 16:27
Vote:
 

Yes, the number of hits are the correct sum of the counts from the multiple queries.

#143764
Jan 29, 2016 16:55
Vote:
 

Frederik - if you use Fiddler can you see the TrackHit call to Find? 

#143852
Feb 02, 2016 10:29
Vote:
 

Yes, the request is triggered when the clicked page has loaded and looks like:

http://site.web.local/find_v2/_track?id=TQqtK-h05Bg9VjFh9Cl-Dw%3d%3d&q=test&tags=language%3asv%2csiteid%3a3b0ae0c6-50ab-4ff7-9b97-00f11dc40275&ip=127.0.0.1&hit.id=X_Web_Models_Pages_XmlDocumentPage/_ff788810-4eae-4fea-910a-a27051d698b1_sv&hit.pos=1

The response looks like:

{"status":"ok","track_id":"TQqtK-h05Bg9VjFh9Cl-Dw==","track_uuid":"7udJbiDUT9W04_tR8UMFNQ"}

The strange thing is that I see the tracked query in the statistics view as well as the tracked click. But under "Searches without relevant hits" it shows a click-rate of 0%. This occurs in both dev and test environment with different indexes.

#143855
Feb 02, 2016 11:13
Vote:
 

And you are sure that all of the multisearch queries are "Track() free"? 

#143859
Feb 02, 2016 12:24
Vote:
 

Yes, there's no Track() in any of the queries. It's all done by a single TrackQuery(..) call. The search count in the statistics UI also seems to indicate this.

Btw, thank you very much for the http://geta.no/blogg/building-an-advanced-search-page-using-episerver-find/ post! Helped me a lot as I was facing the same requirements :)

#143860
Feb 02, 2016 12:50
Vote:
 

I would check if _trackingId is correct, so you track clicks for corresponding searches.

Some quotes from documentation:

Use TrackQuery() to track the user query.
It returns a TrackQueryResult with the TrackId.Use the TrackId returned from TrackQuery() to track hits through the existing Javascript.

Could you try to use TrackId from TrackQueryResult returned by SearchClient.Instance.Statistics().TrackQuery(...) method?

#143863
Feb 02, 2016 13:24
Vote:
 

Great to hear that the blog post was useful! 

In my solution I am handling the TrackHit call to Find my self (by adding a ajax call when the user clicks a search hit). 

Your TrackHit request looks correct, so I would consider filing a bug report to support. 

 

#143864
Feb 02, 2016 13:35
Vote:
 

Dmytro - Thanks for the input. I've tried using both the id from a created TrackingContext as well as the id returned through TrackQueryResult, but both methods result in the same outcome; the search is tracked and the click is tracked, but it still shows a 0% click-rate.

Mari - I'm at my wits end so a bug report seems like the next step, thanks!

#143865
Feb 02, 2016 14:30
Vote:
 

Just to test I implemented Find with the Alloy-demo using unified search. All worked well and the tracking showed up with the correct amount of click through.

I then proceeded to replace the unified search with a projected one adding the same tracking code I'm using in my project. The generated URLs containing the tracking information were identical, yet the tracking only showed queries and clicks under "Most frequent queries", under "Searches without relevant hits" the click-through rate was 0%.

This makes me suspect that the problem might be related to the TrackQuery call, but the parameters seems correct:

  var tags = ServiceLocator.Current.GetInstance<IStatisticTagsHelper>().GetTags().ToList();
 
  _trackingId = new TrackContext().Id;
 
  SearchClient.Instance.Statistics().TrackQuery(_trackingQuery, x =>
          {
              x.Id = _trackingId;
              x.Tags = tags;
              x.Query.Hits = totalNumberOfHits;
          });

Anything I might be missing?

#144041
Feb 04, 2016 16:44
Vote:
 

Think I found the source to the problem. Building my querystring parameters I had called GetTags(false) so there was a missmatch between the initial call and the tracking parameter attached to the URL. The clicks where registered but since the tags didn't match it seems the click-through rate counter ignored these clicks.

#144054
Feb 04, 2016 17:49
Nalin - Nov 20, 2020 4:54
Hi Fredrik,

I am also facing same issue which is tracks are showing under Clicks but Click-Through Rate counter 0%.

Just want to confirm with you about the value what you have set on GetTags method. Did you set GetTags(true) in TrackQuery as well as TrackHit methods?

Thank you.
Nalin
Vote:
 

Nice work, Fredrik! Glad you found the problem.

#144059
Feb 04, 2016 21:06
Vote:
 

Nice catch! I've been following the bug hunt :)

#144077
Feb 05, 2016 9:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.