Test a session trait
We recommend that you test a session trait before activating it in Sitecore Personalize to identify any errors and ensure optimal performance. Testing involves previewing the session trait for a single customer. A successful test indicates that the session trait's JavaScript code is correctly configured.
To test a session trait:
-
Open the session trait and click Test
.
-
In the Test dialog, select a guest to test against by doing one of the following:
-
To select a random guest based on guest type, click in the search box and select Visitor or Customer.
-
To select a specific guest, enter their unique identifier into the search box. You can search for a guest using, for example, an email address, other unique identifier, or browser ID.
-
To select a recently used guest, click the Recent option.
-
To select a bookmarked guest, click the Bookmark option.
TipYou can manually edit the data displayed for the selected guest before initiating the test. This lets you test the session trait logic without the need to find or create a specific guest profile with the relevant attributes.
-
-
Click Test to simulate how the session trait would function in production with the selected guest. The latest session that have a type of Web and status Closed will be used for the test. The test also includes validating the JavaScript and output values. Review any validation messages, make the necessary code updates, and retest when needed.
The test will display the output of the session trait, including its runtime and any logs, on the Response tab.