Recommendation API events
When you make recommendation requests to the API, a recommendation.generated event is created automatically.
If you want to use campaign statistics or build your own Analytics and Automations, you must also send the following events:
- a
recommendation.viewevent when the recommendation is displayed (shown on the screen or scrolled into view). - a
recommendation.clickevent when a result is clicked or tapped.
In these events, the correlationId parameter from the recommendation results and the campaignId parameter are used to correlate the events with a request and campaign that caused them. This can be used in Statistics, Analytics, and Automation.
recommendation.view
Send this event when the recommendation appears in the customer’s view.
In the request, the correlationId must be the same as the correlationId from the recommendation response that was used to display the content.
For more details, see the API Reference.
If you have a custom tracking domain configured:
- Use the custom domain in the URL.
- Add
/aibefore the endpoint path.
curl --location 'https://api.synerise.com/v4/events/ai-compat/recommendation.view?token=98A5FC55-0000-0000-0000-98339BDECAE6' \
--header 'Content-Type: application/json' \
--data '{
"correlationId": "ac371d07-f8a2-4cae-9058-22e00b1f45b3",
"clientUUID": "cf9e9b57-7776-51bc-b7bc-75cc75abdf59",
"items": [
"0196895673303",
"0192309816199",
"0196505285612"
],
"campaignId": "DkhvrZoTKthD" // ADD THIS PARAMETER ONLY IN CAMPAIGN RESULT REQUESTS
}'recommendation.click
Send this event when an item from the recommendation is clicked or tapped, including buttons such as “Add to cart” or “Buy now”.
In the request, the correlationId must be the same as the correlationId from the recommendation response that was used to display the content.
For more details, see the API Reference.
If you have a custom tracking domain configured:
- Use the custom domain in the URL.
- Add
/aibefore the endpoint path.
curl --location 'https://api.synerise.com/v4/events/ai-compat/recommendation.click?token=98A5FC55-0000-0000-0000-98339BDECAE6' \
--header 'Content-Type: application/json' \
--data '{
"correlationId": "ac371d07-f8a2-4cae-9058-22e00b1f45b3",
"clientUUID": "cf9e9b57-7776-51bc-b7bc-75cc75abdf59",
"item": "0196895673303",
"campaignId": "DkhvrZoTKthD" // ADD THIS PARAMETER ONLY IN CAMPAIGN RESULT REQUESTS
}'