Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Introduction to Sitecore Personalize
Managing accounts and system settings
Identifying guests
Introduction to experiments
Introduction to experiences
Decisioning
View dashboards
Developer Center
Connecting to an external system
Using client-side JavaScript
Using server-side JavaScript
AI in Personalize
Glossary
  • Sitecore Personalize
  • Developer Center
  • Web templates
  • Create a web template

Create a web template

Technical team members can create web templates using HTML, CSS, JavaScript, and FreeMarker.

You can optionally create a form for the marketer to complete and render a preview as the marketer completes the form.

When you are ready to make the web template available to the marketer, change the status to published. When the marketer creates the web experiment or experience based off the web template, a form displays for them to apply further customization.

Team members with a User, Developer, or Admin role in Sitecore Cloud Portal can create a web template.

To create a web template:

  1. On the navigation menu, click Developer Center > Web templates.

  2. On the Web Templates page, click Create.

  3. In the Name your template field, enter an intuitive name for the web template. As you type, the name of the template displays in the ID field.

  4. Click Create. The template editor displays for you to customize using HTML, CSS, JavaScript, and FreeMarker, as shown in the following image.

    Configuring HTML in a web template.
  5. To define the structure and content of the web template, use the HTML, CSS, JavaScript, and API tabs to add a custom code and configure the API response.

    When Sitecore Personalize executes a variant for a web experiment or experience, it executes any HTML, CSS, or JavaScript configured in the variant. In order for personalization to work, the variant must pass any guest data to your organization's website, for example the guest's first name, location, loyalty number, etc. This information is known as server-side data. To facilitate, you must compose the API response using FreeMarker, then reference it in the relevant HTML, CSS, or JavaScript tab.

  6. Click the Settings tab in the right pane and configure the following:

    • Description: Enter a description of the web template.

    • Tile Image: Click the Edit icon icon to select an image that represents the type of web template. Only Sitecore CDP users will see this image.

    • Render a Preview on the Experience: Select this checkbox to render a preview of the web experiment or experience as the user completes the form. We recommend that you test that the web experience will successfully render before publishing. Do not use this option for more sophisticated web templates that use handlebars loops. The web experiment or experience will not render as the form is completed, because it needs to wait until the code finishes compiling.

  7. Click Save.

  8. To publish the web template, click the toggle switch to put the template in the Published state. This will make it available when a user creates a new experience or an experience variant using a web template.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore