Framework Guides

Optimizely CMS

Install the Ours Privacy Web SDK on Optimizely CMS, formerly Episerver, by adding the snippet to the shared layout view.

Use this page to install the Ours Privacy Web SDK on a site running Optimizely CMS, previously known as Episerver.

Optimizely CMS renders pages from ASP.NET layout views, so the snippet is added once to the shared layout and deployed like any other code change.

Note: Optimizely sells several products under one brand. This page covers Optimizely CMS, the content management system. If you are looking to run experiments, see Experimentation, which is a separate Ours Privacy product.


Steps to Integrate Ours Privacy with Optimizely CMS

1. Copy your install snippet

Copy your install snippet from the Install Ours page.

2. Add the snippet to your shared layout

Open the shared layout view that renders your site's <head> and paste the snippet before the closing </head> tag:

<!-- your shared layout view -->
<head>
  <!-- Ours Pixel Code -->
  <script>
    // your install code is here
  </script>
  <!-- End Ours Pixel Code -->
</head>

If your solution supports editor-managed settings, an alternative is to expose a head-script property on your site settings block and render it from the layout. That lets marketers change tracking later without a deployment, which is worth the one-time setup if tags change often.

3. Deploy and verify

  1. Deploy through your normal pipeline.
  2. Load a published 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 Projects

If you use Optimizely as a headless content source with a separate front end, the snippet belongs in that front-end application. See Installing on a headless CMS.


Track Custom Events

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

ours('track', 'Form Submitted', { form_name: 'contact_us' });

Next Steps

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

How is this guide?

On this page