Integrations for Salesforce Commerce Cloud
This section covers how to integrate analytics and marketing tools with Salesforce Commerce Cloud (formerly Demandware). SFCC provides robust integration capabilities through its cartridge architecture and SFRA (Storefront Reference Architecture).
Available Integrations
Analytics Platforms
| Platform | Integration Method | Difficulty |
|---|---|---|
| Google Analytics 4 | Cartridge + SFRA | Medium |
| Google Tag Manager | Cartridge + Data Layer | Medium |
SFCC Integration Architecture
Salesforce Commerce Cloud uses a cartridge-based architecture for integrations:
Cartridge Types
- Controller Cartridges - Handle business logic and page rendering
- Model Cartridges - Manage data and backend integrations
- Template Cartridges - ISML templates for frontend rendering
SFRA vs SiteGenesis
- SFRA (Storefront Reference Architecture) - Modern, recommended approach with JavaScript controllers
- SiteGenesis - Legacy architecture, being deprecated
All integration guides in this section assume SFRA unless otherwise noted.
Common Integration Patterns
Data Layer Approach (Recommended)
Push structured data to a data layer for use by multiple tracking tools:
// Example SFCC data layer structure
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'page_view',
page: {
type: 'product',
category: 'Electronics'
},
user: {
logged_in: true,
customer_type: 'returning'
}
});
Server-Side Tracking
SFCC supports server-side tracking through:
- OCAPI (Open Commerce API) - REST API for commerce operations
- SCAPI (Shopper Context API) - Modern headless commerce API
- Webhooks - Event-driven integrations
Prerequisites
Before integrating analytics tools:
- Business Manager Access - Admin access to SFCC Business Manager
- Cartridge Development Environment - Local development setup
- Code Repository Access - Git repository for SFCC code
- Sandbox Environment - Test environment for validation