Clicking on recommendation block
Description
Clicking on a recommendation is a transition to the product card recommended in the block. All hyperlinks related to the recommended product in the product recommendation blocks generated by the system and pointing to the product card (in the product name, in the product photo/image, in the product price, etc.) must contain a click handler for the product recommendation.
Method parameters
<item_id> - The ID of the product that the user clicked on. Must match the product ID provided in the product database;
<method_name> - the name of the algorithm used to generate recommendations that were clicked on (Alternative, Related, Popular, etc.)
<suggester> - block identifier, necessary for correct calculation of statistics for each of them. A unique value must be passed to each block
Code example
<script>
rrApiOnReady.push(
function() {
try {
rrApi.recomMouseDown(<ItemId>, {
suggester: "<%=suggesterId%>",
methodName: "<%=algorithm%>"
})
}
catch(e) {}
}
);
</script>
Updated 9 months ago