SAP Commerce Cloud
Install the Ours Privacy Web SDK on SAP Commerce Cloud, covering both the Composable Storefront and the older Accelerator storefront.
Use this page to install the Ours Privacy Web SDK on a storefront running SAP Commerce Cloud, previously known as Hybris.
SAP Commerce Cloud has two storefront generations and they install differently. Identify which one you run before continuing.
Steps to Integrate Ours Privacy with SAP Commerce Cloud
1. Copy your install snippet
Copy your install snippet from the Install Ours page.
2. Add the snippet to your storefront
Composable Storefront (Spartacus)
The Composable Storefront is an Angular application. Add the snippet to the <head> of index.html at the project root:
<!-- src/index.html -->
<head>
<!-- Ours Pixel Code -->
<script>
// your install code is here
</script>
<!-- End Ours Pixel Code -->
</head>Because this is a single-page application, navigation between pages does not reload the document. The Web SDK handles that automatically, as described in Tracking page views in single-page apps.
Accelerator storefront (JSP)
On an Accelerator-based storefront, the head markup is assembled from shared JSP templates. Add the snippet to the shared template that renders the <head> for all pages, so it applies storefront-wide rather than page by page.
3. Build, deploy, and verify
- Build and deploy through your normal SAP Commerce Cloud pipeline.
- Load a storefront page and view the page source to confirm the snippet is present.
- Open the browser console to check for script errors.
- In your Ours Privacy account, check Recent Events to confirm page views are arriving.
Track Custom Events
Call ours('track', ...) from a component or a template:
ours('track', 'Added To Cart', { sku: 'ABC-123', value: 49.99 });Next Steps
- Web SDK reference: full list of tracking methods and options.
- Tracking page views in single-page apps: for the Composable Storefront.
- Cookie Consent installation: add the consent banner so it loads before other tracking scripts.
If you need further assistance, contact us at support@oursprivacy.com.
How is this guide?

