Try our conversational search powered by Generative AI!

Quicksilver: how does recommendation click tracking work?

Vote:
 

I found that click tracking sets cookie here:

https://github.com/episerver/Quicksilver/blob/eaa1427edc34c778340589cb1d6f0fd53b60e605/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Recommendations.js#L8

But I am not able to find where this cookie is handled. How does it work?

#187440
Jan 23, 2018 10:18
Vote:
 

I realized this is missing in the developer guide. I've added a task to fix that.

It is tied together by IRecommendationContext. The implementation of that service will be asked for the current recommendation ID when the next tracking request is sent. In quicksilver it is handled by a cookie as you have seen, but there may be other ways to do it.

#187442
Jan 23, 2018 10:36
Vote:
 

I still do not understand. The cookie is set but never is read. Is there some hidden cookie reading in that IRecommendationContext?

#187443
Jan 23, 2018 10:49
Vote:
 

It is read, in the EPiServer.Reference.Commerce.Site.Features.Recommendations.Services.RecommendationContext class. Maybe you found the NullRecommendationContext that is shipped with the framework just as a default.

It is designed this way to allow you to use whatever approach you want to track the clicks in your implementation. We considered it too complicated and invasive (to the site implementation) to add a one size fits all framework solution.

#187444
Edited, Jan 23, 2018 10:55
Vote:
 

Thanks! Now it makes more sense. I couldn't find the cookie key anywhere in the code but it is hidden in the EPiServer.Business.Commerce.CookieHelper.

P.S. You definitely should add docs about click tracking :)

#187448
Jan 23, 2018 11:08
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.