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
Send messages with recommendations¶
Triggers are push messages with recommendations. With this feature, your organization can invite individual visitors to return to the website, inform about a change in prices of products from their wishlist, suggest product alternatives, or remind them of items abandoned in a cart by delivering messages, for example, through email. Before you can start using triggers, you must contact Ibexa and define specific conditions, for example:
- the time that must pass before messages start being sent
- Content Types and attributes that are included in a response
- a number of repetitions
Triggers are then processed on the Personalization server and responses are delivered to a dedicated endpoint.
To let your visitors receive emails with recommendations:
1. With the User API, add the
2. Prepare an endpoint to intercept push messages and pass them on, for example, to your mailing system. Out of many options, it could be an Ibexa Connect webhook. The endpoint must meet the following requirements:
- must support POST requests
- must accept JSON objects in a format that resembles the following example:
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
The object contains links to the recommended items (
clickRecommended), which are monitored by the Personalization server to gather statistical data.
Support for endpoints with authorization
The trigger service supports additional Basic/Bearer token authentication to secure communication between the Personalization server and the endpoint. If your endpoint requires authentication, you must provide Ibexa with the token.
[email protected] with your organization's requirements to have the email triggers enabled.
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.