Recommendation clicks

Record when a shopper follows a related or recently viewed product.

POST /events/rec-click
{% form 'rec_click' %}

Records that a visitor followed a product recommendation. It is counted under the visitor's consent like other storefront analytics events. Send it without waiting for the response.

Form fields

placement Required

Recommendation surface the visitor clicked: related_products or recently_viewed.

product_id Required

Recommended product that was followed.

variant_id Optional

Variant when the card linked one.

Validation

Requires the CSRF token. placement must be related_products or recently_viewed; product_id and variant_id must be positive integers. A refused event never changes the page.

Limits

Counted within the same per-visitor limits as other storefront analytics events.

Response

{
  success:true,
  user_errors
}

Invalid input returns HTTP 400 with success: false and STOREFRONT_RUNTIME_INVALID_REQUEST in user_errors; an expired CSRF token returns HTTP 403.