Method Signature
trackRecommendationResultClick.
Parameters
The tracking parameters.
Network-specific parameters.
Returns
Returnstrue on success or an Error object on failure.
Examples
Basic Usage
With Result Metadata
Item-Based Recommendations
With Product Variation
In a React Component
With Analytics Tags
Sponsored Listing
When to Use
Track recommendation clicks:- When a user clicks on a recommended product
- Before navigating to the product detail page
- When adding a recommended product to cart directly from the widget
Difference from trackRecommendationResultClick:
trackRecommendationClick: Provides more detailed metadata (strategyId, seedItemIds, position, etc.)trackRecommendationResultClick: Simpler method with fewer parameters
trackRecommendationClick when you need detailed analytics and attribution.Best Practices
-
Include Position: Always include
resultPositionOnPageto understand which positions perform best. -
Track Strategy: Include
strategyIdto measure performance of different recommendation strategies. -
Seed Items: For item-based recommendations, include
seedItemIdsto track which products drive recommendations. -
Consistent IDs: Ensure
itemIdmatches your catalog and other tracking events.
Error Handling
Related Methods
- trackRecommendationResultClick - Simpler recommendation click tracking
- trackRecommendationView - Track when recommendations are viewed
- trackRecommendationResultsLoaded - Track when recommendations load
- getRecommendationResults - Get recommendation results