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
  • Introduction to experiments in Sitecore Personalize
  • Introduction to interactive experiments in Sitecore Personalize
  • Run an interactive experiment

Run an interactive experiment

After you create an interactive experiment, you can test it by sending a payload of data to Sitecore Personalize that simulates a customer interaction and triggers the experiment.

We recommend doing this for sophisticated experiments that use custom fields. For more simple experiment, you can preview the api response instead of testing the code.

There are different options to run an interactive experiment:

  • Using functions provided by the Engage SDK or Cloud SDK.

  • Sending a POST request using the Personalize REST API.

  • Using the Chrome DevTools console with Boxever.js (legacy).

Engage SDK

If you are using the Engage SDK, you can use the Engage.personalize(personalizationData[, timeout]) function to run an interactive experiment. You must call this function with the friendlyId of the live experiment you want to run.

Here's an example of how to run an experiment and log it to the console.

RequestResponse
import { engage } from "./engage.js";
// ...

const handlePersonalization = async () => {
    const response = await engage.personalize(personalizationData);
    console.log(response);
};

Here's an example of a personalization data object. This object doesn't contain the email attribute or the identifier attribute to identify the guest. This personalization data object also contains an optional custom field.

RequestResponse
const personalizationData = {
    channel: "WEB",
    currency: "EUR",
    pointOfSale: "myretailsite/ireland",
    friendlyId: "running_shoes_popup_02",
    // optional attributes:
    params: { key: "value" }
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore