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 experiences
  • Introduction to experience goals
  • Add a custom goal to an experience in Sitecore Personalize

Add a custom goal to an experience in Sitecore Personalize

You can add a custom goal to an experience to measure the performance of an experience by tracking a numerical custom value from a custom event. A custom value like an order item price or number of clicks, is derived from custom event attributes and considered in goal calculations only when the event triggers and after the session closes.

For example, you can create an experience in Sitecore Personalize and set up a custom goal to monitor the bag item value derived from a custom ADD_BAG event. Additionally, you can specify a goal target, quantifying the custom value you are hoping to achieve with the experience.

We recommend that you do not add more than one goal with the same event to an experience. For example, if you create two goals that both use the same custom event, Sitecore Personalize only counts the first goal and ignores the second goal.

Warning

The Personalize API is what developers use to run interactive experiences. If you add a custom goal to an interactive experience, ensure that your organization uses the browserId attribute when calling the Personalize API. This ensures that the goal is attributed to the correct browser session and the attribution rate is accurate when viewing performance analytics.

To add a custom goal:

  1. In the experience builder, click the Goals tile and click Add Goals.

  2. In the Goals pane, click Custom goal.

  3. In the Custom goal pane, in the Goal name field, enter a descriptive name for the goal. This name will display on the Performance screen.

    Adding a custom goal to an experience in Sitecore Personalize.
  4. In the Goal definition section, do the following:

    • In the first drop-down list, select Increase or Decrease to set whether a higher or lower custom value is considered a successful outcome.

    • In the second drop-down list, select Custom value to choose custom value measurements.

    • In the third drop-down list, select one of the following options to measure the custom value:

      • Per session – calculates the average custom value per session of the experience. This is done by dividing the total custom value in the experience by the number of sessions in the experience.

      • Per conversion (AOV) – calculates the average custom value of converted sessions in the experience. This is done by dividing the total custom value in the experience by the number of converted sessions in the experience.

      • Per guest – calculates the average custom value of the experience for each unique guest. This is done by dividing the total custom value in the experience by the number of unique guests in the experience.

      • Total revenue - calculates the total custom value in the experience.

  5. In the Custom value to measure field, enter the name of the attribute that contains the numerical value you want to track, for example, bagValue. This attribute must be included in the ext object of the custom event sent to Sitecore Personalize.

  6. In the Goal target field, enter the numerical value you want to achieve. For example, if you set a target of 5000, this means the experience will meet the goal when the custom value achieves a numerical value of 5000.

    Note

    Adding a Goal target does not affect any calculations. This value will be displayed as a baseline metric on the Performance screen, designed to help you compare the actual custom value against your targeted goal.

  7. In the Track event section, select one of the following operators to track the custom event:

    • Equals - matches the event name you enter in the text field exactly with the type parameter from the custom event.

      Example: If you entered ADD_BAG in the adjacent text field, this option will only track the event with a parameter that exactly matches this string.

    • Regex - matches the type parameter from the custom event using a Regular Expression (RegEx) pattern. The RegEx should result in a full match of the event name, not a partial match.

      Example: If your type parameter is ADD_BAG, using the RegEx pattern [a-zA-Z] will not match the full string but only one of its letters, like A. However, if you used the pattern [a-zA-Z]+, it will match the entire string and be able to track that event.

    • Starts with - matches the beginning of the type parameter from the custom event with a specific string.

      Example: If you entered ADD_BAG in the adjacent text field, this option will track any event with a parameter that begins with ADD_BAG such as ADD_BAG or ADD_BAG_DISCOUNTED.

  8. In the adjacent text field, enter the full or partial name, or RegEx pattern of the custom event you want to track. This corresponds to the type parameter from the custom event.

    Warning

    You must enter the exact event name, attribute name, and attribute value that your organization passes to the Sitecore Personalize platform, for accurate tracking and goal calculation.

  9. Optionally, to refine event tracking, you can use additional custom attributes included in the ext object of the custom event.

    To do this, click Add Attribute and specify the following:

    • Attribute Name - enter the name of the custom attribute. For example, bagConverted.

    • Operator - select either String Equals or String Not Equals to choose how the attribute value should be matched.

    • Attribute value - enter the required string value of the custom attribute to consider the event successful. For example, when the string equals true.

    To add more attributes, click Add attributes and enter the necessary details. Multiple attributes are evaluated using the AND logic.

  10. Optionally, to add more details about the goal, click Description.

  11. Sitecore Personalize automatically creates a Friendly ID as you enter a Goal name. You can use this ID to refer to the goal when integrating.

    To edit the ID, click and enter the new ID for the goal.

    Note

    When editing, use a-z, 0-9, and underscores for spaces.

  12. Click Save. The goal is added to the Goals tile.

Custom goal snapshot

  • What it tracks - a numerical value derived from a custom event, such as a form submission, button click, or any other user-defined event.

  • Conversion - occurs when the user successfully triggers the custom event during their session and reaches the target custom value, such as a specified number of button clicks.

  • Attribution - identifies and credits the experience that contributed to triggering the custom event and achieving the desired value.

  • Multi-touch example - if a user interacts with a personalized homepage, then navigates to the product category page, and clicks on at least 5 product items (the custom goal), each touchpoint is credited for triggering the custom event and reaching the target value.

Next steps

  • Start the experience for personalization to take effect.

  • View the analytics. After starting the experience, you can immediately see operational data. Within 24 hours, you’ll see the goal target as a baseline on the Performance screen. This lets you easily identify whether the experience has reached its target.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore