Installing the code snippet on Salesforce Commerce Cloud
This doc explains how to deploy the CustomFit.ai code snippet inside a Salesforce Commerce Cloud storefront so you can run A/B tests, personalization campaigns, and behavior-based targeting.
Prerequisites
Make sure you have:
Admin access to Salesforce Commerce Cloud Business Manager
Permission to edit ISML templates
Your CustomFit.ai project script (available in your CustomFit dashboard)
Step 1: Identify the Global Head Template
CustomFit’s script must load on every page of your storefront.
In most Salesforce Commerce Cloud implementations, the shared <head> section is controlled by a template such as:
header.ismlThis template ensures your tracking script runs consistently across homepage, category, product, and checkout pages.
If your project uses a custom structure, locate the ISML file responsible for rendering the <head> tag globally.
Step 2: Insert the CustomFit.ai Tracking Script
Locate the ISML file responsible for rendering the global <head> section of your storefront. In most Salesforce Commerce Cloud implementations, this is the header.isml template.
You can access it either through your local development environment or directly from Business Manager by navigating to:
Administration → Sites → Manage Sites → [Your Site] → Development → Templates
Once there, open the template file that controls the shared head markup across your site pages.
Insert the CustomFit.ai code snippet inside the <head> section of the template. Placing it here ensures the script loads consistently across all storefront pages.
Last updated