This is a premium feature. Contact your Customer Success Manager to enable it on your Kameleoon Account.
- With an XML file containing all required metadata for each of your products. Use this method if you don’t have a data layer and your catalog contains less than 50,000 products. You can easily choose the frequency Kameleoon should sync your catalog in the store settings page. You should perform an XML import once every 24-72 hours to update Kameleoon with your product stock.
- With a Google Merchant Feed URL. Use this method if you have already uploaded your product in Google Merchant Center and if your catalog contains less than 50,000 products. Please contact your Kameleoon Customer Success Manager to enable this method. Follow these steps to sync the Google Merchant with Kameleoon.
- Via Kameleoon’s REST API. Utilize Kameleoon’s REST API for updating your catalog if you need regular updates, especially when dealing with products that quickly go out of stock due to limited availability.
- Via Kameleoon’s Product API. You should use this method if you have a data layer that contains detailed information about your products and product categories. Working with Kameleoon’s API requires that you have metadata available for products and categories from your product pages (for example, in a data layer) that Kameleoon can read and feed into our product recommendation algorithms.
Kameleoon will automatically mark all products not present in the feed as out of stock. Thus, to enhance the feed processing speed and reduce its size, we recommend excluding out-of-stock products from your feed.It’s important to note that one drawback of the Product API method is that if products are not actively searched for or browsed by visitors, Kameleoon may not be aware of those products, and they may not be proposed in product recommendation blocks.
Syncing your Product Feed using Kameleoon Product API
The Product API powers Kameleoon’s product recommendation algorithms and social proofing messaging, such as product impressions and purchases counters and advanced targeting conditions. Once Kameleoon’s Product API methods have been enabled on your website, Kameleoon will start sending product detail events whenever your visitors browse a product or category page, add a product to their carts, or make a purchase. It will also enable the collection of statistics about a given product (e.g., the number of times it was purchased or viewed in the last hour, or day) and power the creation of audience groups you can use in our segment builder using predefined product targeting criteria. You’ll need to add our Product page, Category page, Cart page, and Thank you page snippets to your source code to track interactions with your products and inform our Product Recommendations algorithm. You can also inject them by using our Global custom script feature.trackProductView()
Use thetrackProductView() method on product pages to track when a visitor views a product. Read more about the method here.
Ensure you provide all necessary data for your social proofing setup. Only the data sent via the
trackProductView() method can be retrieved later through the obtainProductData() endpoint.trackCategoryView()
Use thetrackCategoryView() method on category pages to track when a visitor views a product category. Read more about the method here.
Ensure the category ID used here matches the one sent with the trackProductView() method. Read more about the Category object here.
trackAddToCart()
Use thetrackAddToCart() method on any page where a visitor can add a product to their cart—for example, the home page, product page, category page, or cart page.
Read more about the trackAddToCart() method here.
trackTransaction()
Use thetrackTransaction() method on any page displayed after a visitor completes a purchase or transaction. Read more about the method here.
Kameleoon syncs your whole product catalog every two hours and will automatically tag out of stock products as “unavailable” every 12 hours. A product is considered unavailable when the
availableQuantity attribute passed with the addProductView method is equal to zero, which ensures that Kameleoon’s product recommendations only include products that are in stock. You can also set a product to be out of stock using the availableQuantity attribute when using the addProductView method.Syncing your Product Feed using an XML file
Syncing your product catalog using an XML file includes the following steps:- Create an XML file with all the required metadata for each of your products, categories, and locations (for example, countries or locations where you operate and have different pricing, stock, or details for your products). The file must be available from a distant URL. Ensure that you host it in a secure area (for example, S3 bucket) that is accessible to Kameleoon.
- Sync the XML file with Kameleoon and choose the update interval that suits your needs (for example, every hour, three hours, six hours)
- Track your visitors’ events.
Multiple languages websites are not supported; you must create a separate project for each language and provide one feed for each.
Whitelist the following IP addresses to ensure a seamless image download process:
95.216.99.81/2695.216.99.220/2695.216.23.145/2695.216.10.183/2695.216.114.218/2695.217.32.105/2695.216.4.144/2695.216.102.29/26
Step 1: Creating your product feed
The product feed must include basic information about your catalog. Refer to the tables below for the mandatory attributes you must include.Element : yml_catalog
Element : yml_catalog > shop
Element : yml_catalog > shop > categories
Thecategories element contains a list of category elements. Each product category you use to group or tag your products is described by a separate category element.
Example:
Element : yml_catalog > shop > locations
Thelocations element contains a list of your store locations. Each location is described by a separate location element.
You can use the following attributes for the element locations:
Example:
Element : yml_catalog > shop > offers
Theoffers element contains your list of products. Each product is described by a separate offer element.
If all variants of one product are available from the same URL in your store, and there is no common identifier for product variants, Kameleoon will choose the cheapest product variant when recommending this product to your visitors. The availability flag in this case should fit into the following logic: if at least one product variant is in stock, then the product is considered in stock.
Element : yml_catalog > shop > offers > offer
You can use the following attributes for theoffer element:
The offer element can take the following tags:
Example:
Element : yml_catalog > shop > offers > offer > locations
Thelocations element contains a list of locations, and the availability and price of the current product in these locations. Each location is described by a separate element location within the offer tag.
You can use the following attributes for the locations element:
The product will only be considered available for purchase in the locations that are listed in the offer element. In all other unlisted locations, the product will be considered out of stock. You don’t need to add locations if your product is available in all locations, as Kameleoon will automatically consider the product in-stock in all of them.
locations element can take the following tags (only required if the product has a different price/stock quantity in some of your locations).
Element : yml_catalog > shop > offers > offer > fashion
Use the fashion tag if you sell clothes products. The fashion element can take the following tags:Do not specify the
gender element if it’s irrelevant. The product will be labelled “unisex” and will have a lower recommendation priority than other products of the same gender.type element can take the following values:
Example:
The
type parameter is required when using the sizes parameter. You can add a list of available sizes by adding as many size tags as needed within the sizes element (see example below). If you have several locations, and the availability of product sizes is different across locations, insert a location tag with the list of available sizes in each size element (see example below).
Example:
One product can have multiple colors available. You can set a specific picture for a color by adding a
picture attribute. Otherwise, the primary picture will be displayed.Element : yml_catalog > shop > offers > offer > auto
Use theauto tag if you sell auto parts and accessories. Kameleoon’s algorithm is designed to automatically recognize a potential buyer with certain characteristics, like the brand and model of the car. It will be used to display parts and accessories in recommendation blocks that are only compatible with specific car brands and models.
The auto element contains a list of compatible cars. Each car brand and model is described by a separate compatibility element.
If the product is compatible with all cars, you do not need to add
compatibility elements. If the product is compatible with all car models of a brand, you do not have to add the model attribute.compatibility element:
If the product is only compatible with a list of cars, you can also add a
vds element for each compatible car. The vds contains the Vehicle Identification Number (VIN) that serves as the car’s fingerprint.
Example:
Element : yml_catalog > shop > offers > offer > tags
Thetags element contains a list of tags associated with the product. This is useful for improving Kameleoon’s search engine recommendation. Each value is described by a separate tag element.
You will find examples of XML files you can use as a template below:
- XML product feed - example 1 (without locations elements):
- XML product feed - example 2 (with locations elements):
Step 2: Sync your product feed file with Kameleoon
By default, the Kameleoon feed syncs with your XML file every 24 hours. However, you can change this setting if your product catalog updates more frequently. You can make adjustments in Store settings.

Step 3: Track visitors’ events
In addition to syncing your XML product feed, you must implement events to track product events, such as product view, add to cart, and transaction.Product views
You must use thetrackProductView method.
Kameleoon.API.Products.trackProductView("ProductID/SKU/EAN");
Read the detailed instructions
trackAddToCart()
You must use thetrackAddToCart() method whenever a product has been added to the visitor’s cart or when the visitor accesses the cart page.
Kameleoon.API.Products.trackAddToCart("ProductID/SKU/EAN");
Read the detailed instructions
Transaction
Validate your feed sync status
If you use Kameleoon’s Product API, you can verify that your implementation was successful by using theobtainProductData method. This method allows you to easily QA your implementation in real-time and verify that Kameleoon collected your product attributes correctly.
You can visualize your product catalog by using the Data feed menu.

