New Feature: Conditional Email Content Based on Tags

You can now only show certain parts of an email or exclude part of an email based on a Subscriber's Tags. This will work in both Sequences and Broadcasts. 

Here's how it works. 

Click "Personalize" to Insert the Subscriber Merge Tags. 

The following code will be automatically inserted into your Email: 

Replace Tag Name with the exact Name of your Tag, including spaces and special characters. Edit your content. 

Note: if you click "Browser" or "Email" Preview, you will only see the message as if you DO NOT have the Tag. If you would like to see what the content looks like if you DO have the Tag, you will need to send a live message to your Tagged self. 

What if you only want to show a part of a message to Tagged subscribers? 

Just remove the {% else %} tag, and the entire message will only be seen by Tagged Subscribers. 

What if you only want to show a part of a message to Untagged Subscribers? 

You'll need to use a different Tag, that is not currently built into the app. You can copy it below: 

{% unless subscriber.tags contains "Tag Name" %}
  The subscriber doesn’t have the tag
{% endunless %}

Else If Statements

You can also write else if statements to get more sophisticated, like this:

{% if subscriber.tags contains "Tag 1" %}
Has "Tag 1" tag
{% elsif subscriber.tags contains "Tag 2" %}
Or has "Tag 2" tag
{% endif %}

Nesting if statements

You can also nest different kinds of if statements. So if you had your customers tagged based on the language they are learning you could write something like this:

{% if subscriber.first_name != blank %}
  {% if subscriber.tags contains "Spanish" %}
    Hola {{ subscriber.first_name }}!
  {% elsif subscriber.tags contains "French" %}
    Bonjour {{ subscriber.first_name }}!
  {% else %}
    Hello {{ subscriber.first_name }}!
  {% endif %}
{% else %}
  Hello!
{% endif %}

Note that I added indentations to make it a bit more readable, but you wouldn't want to have that in your example.

Important 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
  • You should always test that you got the syntax correct by sending yourself a test broadcast. 

Still need help? Contact Us Contact Us