Adobe Experience Manager
Install the Ours Privacy Web SDK on an Adobe Experience Manager site using a client library or the page component head, for page views and custom events.
Use this page to install the Ours Privacy Web SDK on a site running Adobe Experience Manager (AEM), including AEM as a Cloud Service.
AEM does not expose a marketer-editable head field. The snippet is added by a developer, once, to the page component that renders every template. After that, marketers do not need to touch it again.
Note: Talk to whoever owns your AEM codebase before starting. The change is small, but it goes through your normal AEM deployment pipeline.
Steps to Integrate Ours Privacy with AEM
1. Copy your install snippet
Copy your install snippet from the Install Ours page.
2. Add the snippet to your page head
AEM offers two common places to put it. Either works, so pick whichever matches how your project is already organized.
Option A: the page component head (most direct)
Add the snippet to your site's customheaderlibs.html file, which AEM renders inside the <head> of every page built from that page component:
<!-- apps/<your-project>/components/page/customheaderlibs.html -->
<!-- Ours Pixel Code -->
<script>
// your install code is here
</script>
<!-- End Ours Pixel Code -->Option B: a client library
If your project keeps all front-end assets in client libraries, create a clientlib category for Ours Privacy and embed it in the page head. Load it early so tracking initializes before the rest of your page scripts. Adobe documents the setup in Using Client-Side Libraries.
3. Deploy and verify
- Deploy the change through your normal AEM pipeline.
- Load a published page and open the browser console to check for script errors.
- In your Ours Privacy account, check Recent Events to confirm page views are arriving.
Important: Client library output is cached by the AEM Dispatcher. If you do not see the snippet in the page source after deploying, flush the Dispatcher cache for the affected paths.
Headless and SPA Editor Projects
If your AEM project is headless, or uses the SPA Editor with a React or Angular front end, the snippet does not belong in AEM at all. It goes in the front-end application that renders your pages. See Installing on a headless CMS and Tracking page views in single-page apps.
Track Custom Events
Call ours('track', ...) from any inline script or client library on the page:
ours('track', 'Form Submitted', { form_name: 'contact_us' });Next Steps
- Web SDK reference: full list of tracking methods and options.
- Installing on a headless CMS: for headless and SPA Editor projects.
- 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?

