HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

If the user clicks on a Product Recommendations item, the click must be tracked to generate useful recommendations. Two JavaScript functions are available to achieve this.

  • **Peerius.smartRecsClick(id)** must be called when a product recommendation is clicked and the click takes the customer to a new page.

  • **Peerius.smartRecsSendClick(id)** should be called if the user stays on the same page following the click. **(smartRecsSendClick(id)** sends the click to our servers via a background request).

Usage of **smartRecsClick(id)** is demonstrated in the example below:

Marking clicks

This topic describes how to track clicks to generate useful recommendations.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.