Method Signature
Parameters
Parameters for the recommendation click event
Optional parameters for the network request
Returns
Returnstrue on success or an Error object if validation fails.
Examples
Basic Example
Complete Example
Integration Example
Example with Seed Items
Carousel Click Example
When to Use
CalltrackRecommendationClick() when:
- A user clicks on a recommended product
- A user navigates to a product detail page from recommendations
- A user interacts with a recommendation carousel item
- A user clicks a quick-view button on a recommendation
Important Notes
- Always include the
resultIdfrom Constructor.io’s recommendations response - The
podIdmust match the pod ID used intrackRecommendationView - The
strategyIdshould match the strategy from the recommendations API response - Both
itemIdanditemNameare required - Track this event before navigating away from the current page
- The
resultPositionOnPageshould be 0-indexed
Strategy ID Examples
Common strategy IDs:"popularity"- Popular items"personalized"- Personalized recommendations"item_similarity"- Similar items"collaborative_filtering"- Items other users liked"trending"- Trending items"complementary"- Complementary products
Pod and Strategy Mapping
Ensure consistency across tracking calls:Sponsored Listings
If the clicked item is a sponsored listing:Position Tracking
Tracking position helps understand which recommendation slots perform best:Relationship with Other Events
Track these events in sequence:- trackRecommendationView - When recommendations are displayed
- trackRecommendationClick - When user clicks a recommendation (this method)
- trackConversion - If the click leads to a conversion
API Endpoint
This method sends aPOST request to:
Related Methods
- trackRecommendationView - Track recommendation displays
- trackSearchResultClick - Track search result clicks
- trackBrowseResultClick - Track browse result clicks
- trackConversion - Track conversions