Collections

Introduction to Liquid Tags and Dynamic Content in Emails

By Jitta

Updated 5 days ago

Include a Liquid Tag in an email.

Gist allows you to include a message, that will only be seen if the Contact has a specific property in their profile.

Example:

Email message example text is bolded.


{% if subscriber.tags contains 'tag1' %}

This text will be sent to Contacts with the "tag1' tag on their profile.

{% endif %}


As seen inside Gist Email Composer: (Color added to show different components of Liquid Tag)


Add multiple variables to your liquid tag.

Gist allows you add more than one variable to your liquid tag. Now you can send 1 email, and Contacts will receive different messages depending on which property they have or don't have.


Example:

Email message example text is bolded.


{% if subscriber.tags contains "tag1" %}

This text will be sent to Contacts with the "tag1' tag on their profile.

{% elsif subscriber.tags contains  "tag2" %}

This text will be sent to Contacts with the "tag2' tag on their profile.

{% else %}

This text will be sent to Contacts that do not have "tag1" or tag2" on their profile.

{% endif %}


As seen inside Gist Email Composer: (Color added to show different components of Liquid Tag)


These are the operators that can be used:

Note: The following would replace "contains" in the above examples.

{% if subscriber.property contains "tag1" %}

{% if subscriber.tags contains "tag1" %}

{% if subscriber.web sessions <= "100" %}


`==`  is equal to

`!=` is not equal to

`<` is less than

`<=` is less than or equal to

`>` is greater than

`>=` is greater than or equal to

`and`checks that both condition A and condition B exist

`or` checks that either condition A or condition B exist

`contains` checks for a substring within a string or an array


Need Help?

If you have any further questions, please start a Live Chat. Just "Click" on the Chat Icon in the lower right corner to talk with our support team.

Did this answer your question?