# Getting started

Product recommendations are a vital component for personalizing customer journeys and boosting sales. User.com's recommendation engine leverages user behavior and product data to deliver tailored suggestions, enhancing user experience and driving conversions.

The recommendation model is primarily pre-trained using historical purchase event data to understand product relationships and general buying patterns. For personalized recommendations, the system also considers the recent product interaction history of the specific user (product events like view, add to cart, etc.).

# Implementation options

There are two main ways to implement product recommendations:

  1. User.com Recommendation Widgets: You can configure recommendation widgets in the User.com app under Website experience -> Product recommendation widgets. This provides a default JavaScript script that handles API communication, HTML generation, and basic styling. This script is designed to be customized — you will likely need to modify the JavaScript (HTML structure and CSS) to match your site's design.
  2. Recommendation API: You can use the API endpoints to fetch recommendations and display them using your own custom logic and UI. This gives you full control over the presentation and integration.

# Core data requirements

To ensure the recommendation engine generates relevant and effective suggestions, certain data foundations are crucial.

# Product events tracking

Consistent and accurate product events tracking is fundamental.

  • Purchase Events (Essential): purchase events are used for model training. It is recommended to have historical data from at least the last six months. Each event must include:

    • event_type: "purchase"
    • product_id: Unique identifier of the product.
    • timestamp: Precise date and time.
  • Other Product Events (Personalization): For dynamic personalization (especially for predict-for-user), tracking additional events is highly recommended:

    • view: When a user views a product page.
    • add to cart: When a user adds a product to the cart.
    • checkout: When a user initiates or completes checkout steps.

# Product catalog attributes

For recommendations to be effective, your products in the User.com Products section must have key attributes populated:

  • name: Display name.
  • custom_id: Your unique product identifier (must match the ID used in product events).
  • image_url: Direct link to the product image.
  • url: Direct link to the product page.
  • price: Current price.