Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt

Use this file to discover all available pages before exploring further.

This is a premium feature. Contact your Customer Success Manager to enable it on your Kameleoon account.
To access the Product Recommendations workspace:
  • Click Settings > Recommendations.

Recommendation strategy

Create a strategy

  1. In the Recommendations menu, click Recommendation strategy.
  2. Click + Add block in the header to create a new strategy.
  1. Enter a name and a description.
  2. Define the maximum number of products to display in the block.
  3. Click Save.
Once you’ve saved your strategy, you can configure its rules, templates, and design.

Configure rules

Use the Rules section to define how your recommendation strategy selects and filters products. You can configure:
  • The strategy’s title and description
  • The algorithms, products in block, and tags
For example, you can use one algorithm if a product costs less than a certain amount, and another algorithm if it costs more. After configuring your rules, click Save to apply your changes. To learn how to configure advanced rules, see Define advanced merchandising rules.

Algorithms

Kameleoon algorithms determine which products appear in your recommendation block. You can select an algorithm, specify how many products it returns, and apply filters. If you set a limit of 10 products in the algorithm and define 6 as the block limit, the block will display 6 products. To see the list of available algorithms, refer to Select an algorithm for your product recommendation block.

Select a template

In the Template section, you can quickly apply predefined setups to your project. You can define your own template by editing the default code in the editor using Liquid Markup, or apply an existing template. To customize existing templates or create a new one, use the dedicated Templates page. You can also add UTM parameters to track the strategy’s performance in your analytics platform.

Publish your strategy

Once you’re finished, click Copy code to get the generated snippet for your block. Paste it into your page’s source code where you want it to appear. You can also use Kameleoon’s Activation API to serve product recommendations. The API automatically uses the latest version of your saved template.
When your block uses certain algorithms, you must include Kameleoon’s predefined variables. For example, if you use the Similar product algorithm and want to display your block on all product pages, add the data-recommender-item variable to specify the current product’s ID. The table below lists all available Kameleoon variables.
ParameterMandatoryDescription
data-recommender-minNoThe minimum number of products in the response for the block to appear. The block is hidden if there aren’t enough products.
data-recommender-codeYesProduct recommendation block ID
data-recommender-itemYes (for some algorithms)Current product’s ID if the user is on the product card. Mandatory for blocks with the algorithms “Similar” and “They also buy this”.
data-recommender-excludeNoA comma-separated list of product IDs that must be excluded from recommendations.
data-recommender-search_queryNoThe current search term. Used in a block on a search results page.
data-recommender-callbackNoThe name of the JS function where the API request’s results will be passed if a custom product recommendation handler is required.
data-recommender-errorNoThe name of the JS function that will be called if the product recommendation request fails.
data-recommender-categoryNoRecommend products only from the specified category.
data-recommender-categoriesNoRecommend products only from the specified categories (comma-separated list of category IDs).
data-recommender-brandsNoRecommend products only from specified brands (comma-separated list of brands).
By default, product recommendations share the same consent settings as your A/B tests and personalizations—you cannot configure a separate consent policy for recommendations independently. You can contact your Customer Success Manager (CSM) to configure a distinct consent policy specifically for product recommendations.

How configuration affects recommendations

The behavior of the recommendation engine depends on your account’s consent requirements:
  • When consent is not required: Kameleoon stores visitor data in cookies and transmits it to the recommendation module regardless of the visitor’s consent status.
  • When consent is required: The consent the visitor provides determines how Kameleoon manages their data:
    • Consent granted: Kameleoon stores and transmits visitor data to provide personalized recommendations based on browsing history and behavior.
    • Consent not granted: Kameleoon does not store visitor data in cookies. The recommendation algorithms only display products using logic or filters that do not require visitor data, such as general popularity or static global filters.

Update your settings

Contact your CSM to enable a separate consent policy for product recommendations or to update your existing configuration.

Manage templates

Use the Templates page to create and customize templates for your recommendation blocks.
  1. In the Recommendations menu, click Templates.
  2. Click + Add template.
  3. Enter a name for your template.
  4. Edit the template’s code to define the layout and information displayed (for example, product brand, image, or description).
  5. Click Save.
You can create multiple templates, and use the same templates across strategies or assign a dedicated one to each strategy. Templates use Liquid Markup.

Customize design

In the Recommendations menu, click Design to customize your block’s visual style. Click the pencil icon to access the editors. You can choose between:
  • Basic editor: Customize visual elements through a simple interface.
  • CSS editor: Write custom CSS for complete styling control.