Use HTML in a web experiment
Describes how to use HTML in a web experiment to use dynamic data (Sitecore Personalize).
A useful way to insert dynamic data on a website and facilitate 1:1 personalization is including HTML in a web experiment.
To use HTML in a web experiment:
On the Build screen, click Edit next to the variant you want to configure.
In the template editor, on the HTML tab, enter any HTML that you want to use in the web experiment.
To insert dynamic data into HTML, in the Data Selector search box, enter a guest's email address to search. This enables you to access data model attributes and paths.
Tip
If there is a guest whose data you often use when configuring or testing code, click the star icon to bookmark the guest so you no longer have to search for them.
To include dynamic data from the decision model response, expand the Decision Model Response tree and click copy, Copy Path as Handlebars.
To include dynamic data from the experience response, expand the Experience Response tree and click copy, Copy Path as Handlebars.
On the HTML tab, paste the data and click Save.
Click Close. You return to the Build screen.
You must also include the dynamic data when you compose the API response. This ensures that when the experience executes, the server requests the dynamic data and passes it to the variant.