- Functions
personalize
Version:
| Type | Function |
| Import path | @sitecore-cloudsdk/personalize/server |
From the server side, runs interactive experiences and experiments that are live in Sitecore Personalize. Automatically captures UTM parameters from the URL of the webpage where the function runs.
Signature
Parameters
| Name | Type | Description |
|---|---|---|
request | Request | Required. The HTTP request. |
personalizeData | PersonalizeData | Required. Event and experiment data. |
opts | object | Optional. Additional personalization options. |
Opts properties
Opts properties| Name | Type | Description | Value |
|---|---|---|---|
timeout | integer | Optional. The number of milliseconds before the function times out and returns an error. For example, for the function to time out in 10 seconds, set the value to 10000.Minimum: 0. | 10000 |
Return value
Returns the API response of the interactive experience or experiment.
Examples
Example 62. Running the personalize function
Note
To run this function, you have to first initialize the Cloud SDK.
See more examples and other data you can include in the event.
Here's an example of how to use the personalize function:
personalizeRes contains the API response that the experience or experiment was configured to return.
:::
If you have suggestions for improving this article, let us know!