HTML
How to use the HTML box in the Template Builder for Optimizely Web Experimentation and Optimizely Personalization
You can write the body of the experience template in Optimizely Web Experimentation and Optimizely Personalization in the HTML box. You can write any HTML here and decide where it gets injected in the Apply JS section. Along with vanilla HTML, you can use mustache syntax to add more advanced logic like loops and conditionals.
You can reference field values by using the API name on the extension object like {{ extension.title }}
. For nonescaped values like an HTML or rich text field, use triple brackets like {{{ extension.contents }}}
.
<div class="banner" style="background-color: {{extension.color}}">
{{{ extension.text }}}.
<a href="{{extension.link}}">{{{ extension.link_text }}}</a>
</div>
Updated 22 days ago