logo

English

Recommendations

Recommend & Feedback

    let response = await client.recommend({
        id: 2,
        itemURLSchema: 'https://www.my-website.com/all-tasks/all-items/{id}',
    });

    /**
    * when your users see the results, you register an event like onclick, that will 
    *  a feedback request to Lableb in case the user clicked on it.
    * 
    * here's an example in case the first item get clicked by the user
    */
    client.recommendFeedback(response.data.response.results[0].feedbackUrl);