Framework Guides

Salesforce Commerce Cloud

Install the Ours Privacy Web SDK on a Salesforce Commerce Cloud storefront by adding the snippet to the SFRA head template through a cartridge.

Use this page to install the Ours Privacy Web SDK on a Salesforce Commerce Cloud (SFCC) storefront.

SFCC has no admin field for custom head scripts. The snippet goes into a storefront template, which means this install is done by a developer and deployed like any other code change. Plan for that rather than expecting a self-serve path in Business Manager.

Note: This page covers installing tracking on a Commerce Cloud storefront. To send events from Ours Privacy into Salesforce, see the Salesforce destination.


Steps to Integrate Ours Privacy with Commerce Cloud

1. Copy your install snippet

Copy your install snippet from the Install Ours page.

2. Add the snippet to the storefront head template

On a Storefront Reference Architecture (SFRA) site, the shared head markup lives in htmlHead.isml. Rather than editing the base cartridge directly, override that template in your own cartridge so the change survives future SFRA upgrades:

<!-- cartridge/templates/default/common/htmlHead.isml -->
<isinclude template="/common/htmlHeadBase" />

<!-- Ours Pixel Code -->
<script>
  // your install code is here
</script>
<!-- End Ours Pixel Code -->

Confirm your cartridge appears before app_storefront_base in the site's cartridge path, or the override will not take effect.

On an older SiteGenesis storefront, the equivalent template is htmlhead.isml. The approach is the same: override it from your own cartridge.

3. Upload, activate, and verify

  1. Upload your code version and activate it in Business Manager.
  2. Load a storefront page and view the page source to confirm the snippet is present.
  3. Open the browser console to check for script errors.
  4. In your Ours Privacy account, check Recent Events to confirm page views are arriving.

Headless and Composable Storefronts

If you run a headless storefront on the Progressive Web App Kit or another custom front end, the snippet belongs in that application rather than in an ISML template. See Tracking page views in single-page apps for handling client-side route changes.


Track Custom Events

Call ours('track', ...) from a template or a client-side script:

ours('track', 'Added To Cart', { sku: 'ABC-123', value: 49.99 });

Next Steps

If you need further assistance, contact us at support@oursprivacy.com.

How is this guide?

On this page