Skip to main content

View Conversion Events in a Rule


View Conversion Events in a Rule

If Optimize is enabled, you can view conversion rates in your rule.

For further information on Optimize, see the Optimize – Zephr Journey topic.

You can trigger a conversion event, such as a registration successful event, using code in your custom component block.

For example, the following code creates an HTML component:

// JavaScript here
fetch('/zephr/public/rule-outcomes/v1/conversions', {method: 'POST', headers: { 'Content-Type': 'application/json' }, body: `{
  "conversion": "REGISTERED", // or "CUSTOMER", if it's a payment form
  "ruleId": "{{ruleId}}",
  "outcomeId": "{{outcomeId}}"
// JavaScript here

As you can see, the HTML is contained in the JavaScript, which registers the outcome.