personalize
|
Type |
Function |
|
Import path |
|
From the browser 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 |
|---|---|---|
|
|
Required. Event and experiment data. | |
|
|
Optional. Additional personalization options. |
Opts properties
Opts properties|
Name |
Type |
Description |
Value |
|---|---|---|---|
|
|
|
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 Minimum: |
|
Return value
Returns the API response of the interactive experience or experiment.
Examples
Next.js
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.
JSS Next.js
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.