Clicking on a product in a recommendation block
Description
Clicking on a recommendation is, in fact, a transition to the product page 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 page (in the product name, in the product photo/image, in the product price, etc.), must contain a click handler for the product recommendation.
<item_id> - The ID of the product the user clicked on. Must match the product ID submitted in the product database.
<method_name> - The name of the algorithm that generated the recommendations where the click occurred (Alternative, Related, Popular, etc.).
<suggester> - The block identifier, necessary for correctly calculating statistics for each of them. Each block must be passed a unique value.
Code example
<script>
rrApiOnReady.push(
function() {
try {
rrApi.recomMouseDown(<item_id>, {
suggester: "<%=suggesterId%>",
methodName: "<%=algorithm%>"
})
}
catch(e) {}
}
);
</script>