What variables can I use to create conditional content?

The variables below are small snippets of code that will pull specific subscriber and list information into your messages. For example, if you wanted to greet your subscribers and address them by their first names, then you would use "{{ subscriber.first_name }}" in the message. Similarly, if you wanted to add an additional unsubscribe link to your message, then you would use "{{ subscriber.unsubscribe_link }}."

You can also use these variables, as well as other codes like operators and comparison operators, to display specific content as long as certain conditions are met. There are a lot of different ways that you can use conditional content in your messages, but these variables are the building blocks to help you code conditional content.

Subscriber Information

Full name

This variable will pull the subscriber's first and last name into the message if both are available.

{{ subscriber.name }}

First name

This variable will pull only the subscriber's first name, before the first space. For example: if the subscriber's name is listed as "John Joseph Smith," the variable would only pull "John."

{{ subscriber.first_name }}

Last name

This variable will pull only the subscriber's last name.

{{ subscriber.last_name }}

Email address

This variable will pull the subscriber's email address.

{{ subscriber.email }}

Tags

You can use this variable to create content tailored to subscribers that are labeled with various tags.

{% if "premium_customer" in subscriber.tags %}
<p>Welcome back to my store!</p>
{% else %}
<p>Welcome to my store!</p>
{% endif %}

Custom fields

You can use this variable to create content tailored to a specific custom field. You will have to replace 'FIELD_NAME' with the name of the field you created.

{{ subscriber.custom_field['FIELD_NAME'] }}

custom_field.gif

 

Unsubscribe link

This variable will add an additional unsubscribe link.

{{ subscriber.unsubscribe_link }}

 

Subscriber Sign Up Details

Date

This variable shows the date that a subscriber was added.

{{ subscriber.signup.date }}

Sign up URL

This variable will show the URL where the subscriber signed up for your list. Note: most API integrations will not pass the URL to AWeber.

{{ subscriber.signup.url }}

Unsubscribe URL

{{ subscriber.unsubscribe_link }}

City

This variable will pull the city based on the IP address where the subscriber signed up.

{{ subscriber.signup.city }}

State

This will pull the state, if applicable, based on the IP address where the subscriber signed up.

{{ subscriber.signup.state }}

Postal code

This variable will pull the postal code based on the IP address where the subscriber signed up.

{{ subscriber.signup.postal_code }}

Area code

This variable will pull the subscriber's area code from their phone number.

{{ subscriber.signup.area_code }}

Country

You can use this variable to tailor messages to subscribers in specific countries.

{{ subscriber.signup.country }}

Region

You can use this variable to tailor messages to a specific region, like a province.

{{ subscriber.signup.region }}

DMA

This variable utilizes the subscriber's Direct Marketing Association code

{{ subscriber.signup.dma }}

Longitude

This variable will use the subscriber's longitude.

{{ subscriber.signup.longitude }}

Latitude

This variable will use the subscriber's latitude. 

{{ subscriber.signup.latitude }}

 

Message Details

Archive URL

You can use this variable to display your broadcast archive URL.

{{ message.archive_url }} 

 

List Details

Global Fields

This variable will pull any of your global text snippets in your list settings. You just have to replace 'FIELD_NAME' with the name of your snippet.

{{ list.global_field['FIELD_NAME'] }}

Signature

This variable will add your email signature.

{{ list.signature }}

List Contact Address

This variable will add your CAN-SPAM mailing address.

{{ list.contact_address }}

For more information on conditional content, and how to utilize personalizations in your messages, check out the articles below:

Have more questions? Submit a request
Powered by Zendesk