Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
  • Using client-side JavaScript
  • Glossary
  1. Sitecore Personalize
  1. Sitecore Personalize
  2. Using client-side JavaScript in personalization

Using client-side JavaScript in personalization

Sitecore Personalize supports both client-side and server-side JavaScript, depending on the feature that you are using. This topic identifies which features use client-side JavaScript, and the supported JavaScript functionality. You can also use server-side JavaScript in the Sitecore Personalize application.

Client-side JavaScript (CSJS) is an extended version of JavaScript that is used to enhance and manipulate web pages and client browsers.

Sitecore Personalize supports modern JavaScript on the client-side, JavaScript EcmaScript (ES) 6. If your organization is concerned about compatibility with Internet Explorer 11, we recommend that you apply the JavaScript ES5 style.

You can determine the CSJS that will run when the experiment runs. A marketer can apply the CSJS by adding a web template, or a programmer can write the CSJS themselves.

You can run CSJS to determine the following:

  • Run a web experience based on conditions that relate to the page that the guest is visiting.

  • Enable SItecore Personalize to access browser data, including the Document Object Model (DOM) from the browser. This enables you to manipulate the structure, style, and content of the experiment, including where and how you want the offer or content to display in the browser.

  • Use SSJS when using CSJS. This can include a full history of the guest as well as a continuous stream of real-time session data. An internal service known as the Guest Context Service generates the guest attributes on the server-side.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use