1. Enable the product collection
Before deployment, ensure your collection is active:- Go to the Product collections dashboard.
- Open the collection you want to deploy.
- Click Enable in the top-right corner.
2. Copy the snippet
Each collection comes with a snippet that you must add to your website’s source code: Click Copy code in the collection view. A pop-in will display the snippet along with supported variables:data-collection-id(required): Unique identifier for your collection.data-collection-locations(optional): Needed if your product feed contains multiple locations.data-collection-callback(optional): JS function for handling successful requests.data-collection-error(optional): JS function for handling failed requests.
3. Deploy the product collection on your website
You can insert the product collection in your source code or create a Kameleoon campaign.Embed the snippet in your source code
Paste the copied snippet into the relevant section of your website’s source code. The snippet acts as a placeholder where the product collection will be displayed.- Place the snippet in your page’s HTML body, within the container where you want the collection to appear.
- Ensure your site loads Kameleoon correctly, so the collection is rendered dynamically.