Skip to main content
Skip table of contents

Zeta Markup Language (ZML)

Zeta Markup Language (ZML) is based on the open-source template language Liquid created by Shopify. ZML is used in the Zeta Marketing Platform to perform personalization and dynamic operations within the content. ZML code can be categorized into objects, tags, and filters.

Objects

Objects tell ZML were to show content on a page. Objects and variable names are denoted by double curly braces: {{ and }}. This is how user properties can be populated within the content to perform basic personalization.

Input

{{ first_name }}

Output

Ryan

In this example, ZML is rendering the content of an object containing the user property called first_name, and that object contains the string, Ryan.

Tags

Tags are used to define logic within the content. They are denoted by curly braces and percent signs: {% and %}. This markup used in tags usually does not produce any visible text. Possible exceptions are noted below. This means that you can assign variables and create conditions and loops without showing any of the ZML in content.

Input

{% if first_name %}

Hello {{ first_name }}!

{% endif %}

Output

Hello Ryan!

Tags can be categorized into several types. You can read more about each type of tag in their respective sections.

Filters

Filters change the output of a ZML object. They are used within an output and are separated by a |.

Input

{{ first_name | default: "Valued Customer" }}

Assuming first_name is null or doesn't exist:

Output

Valued Customer

Multiple filters can be used on one output. They are applied from left to right.

Input

{{ "ryan!" | capitalize | prepend: "Hello " }}

Output

Hello Ryan!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.