Conditional Content in Sequences and Broadcasts

You can now access the subscriber’s tags within an email to conditionally show or hide text based on whether they have a tag. The basic syntax is, if the tag is called Tag Name:

{% if subscriber.tags contains "Tag Name" %}

 The subscriber has the tag

{% endif %}

You can also have two different versions:

{% if subscriber.tags contains "Tag Name" %}

 The subscriber has the tag

{% else %}

 The subscriber does not have the tag

{% endif %}

If you want to hide text if the subscriber has the tag, you can use unless:

{% unless subscriber.tags contains "Tag Name" %}

 The subscriber doesn’t have the tag

{% endunless %}

Notes:

  • The tag name must match exactly
  • If the tag name has single quotes (‘), you must use double quotes around the name. E.g., "Teacher’s Pet"
  • Likewise, if the tag name has double quotes, you must use single quotes. E.g., 'Product "Suggestions"'
  • You cannot have a mix of single and double quotes in a tag name
  • You cannot use Smart Quotes to enclose a tag name

Still need help? Contact Us Contact Us