Is it possible to track search phrases (most common/without hits) when using unified search? If so, can anyone provide some dummy code on how to achieve this?
Note that I don't want to track clicks or anything, just the search phrases. I tried enabling click tracking but ended up with this ugly URL which I don't want to expose to the end user.
We're using EPiServer CMS 10.10.4.0 along with EPiServer Find 126.96.36.199.
Hi Markus Andersson,
May be this helps
public static string TrackQuery(string query, int noOfHits = 1)
var id = new TrackContext().Id;
SearchClient.Instance.Statistics().TrackQuery(query, x =>
x.Id = id;
x.Tags = GetTags();
x.Query.Hits = noOfHits;
And thank you! It worked the way I expected.
However, I find it weird that you have to do this manually when using Unified Search.
Glad it helped.
Just one thing GetTags() function is just this line