Integrate recommendation service¶
To return recommendations, you must first enable the Personalization service. Next, integrate the service with Ibexa DXP by activating event tracking and embedding recommendation results into the website.
Examples below use '00000' as a customer ID for creating requests. In a real-life scenario, use the customer ID that you receive from Ibexa.
The service primarily relies on event tracking. For the events to be registered, every Content item or product page must call a special tracking URL. The easiest way of embedding the tracking URL is placing a one pixel image on every page, like in the case of analytical tools or visitor counters. A code that includes an image looks like this:
<img href="https://event.perso.ibexa.co/ebl/00000/click/<user_ID>/<content_type_ID>/<content_ID>" width="1" height="1">
<user_ID>stands either for the user ID or session ID of the user who is currently logged into your website (any URL-encoded string is allowed).
<content_type_ID>stands for the contentTypeId of the Content item or product that you want to track and recommend.
<content_ID>stands for the id of the Content item or product that you want to track and recommend.
The following examples show how you can integrate a CLICK event:
1 2 3 4 5
1 2 3 4 5 6
A similar tracking image can be placed on a confirmation page that ends the payment process.
1 2 3 4 5
As soon as the Personalization server collects enough events, it can generate recommendations. The more tracking data is available, the more accurate the recommendations. Recommendations can be fetched with the following calls, and the response is returned in JSON format.
To return the most popular products, use:
To return products that the current user is most probably interested in, use:
To return products that are most probably interesting for users interested in product 123, use:
A response with two recommendations resembles the following object:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
You can use the following code to make requests and parse results:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
You can configure integration at a more advanced level to track more events, use additional parameters, apply custom scenario configurations, filters, and enable additional features.
For more information about available functionalities, see the User Documentation.