Skip to main content

Set default merge tag values

Input default values that will display if the user profile doesn't have any data in a certain field

Written by Mark

A merge tag only works correctly when there is data in the field it's associated with. To avoid nothing populating when a certain field contains no data, be sure to set a default merge tag.

A merge tag will only work if there is data in the field it’s connected to. If that data is missing from the contact’s Hive profile (for example, a subscriber doesn’t have a first name), the merge tag won’t populate anything—leaving a blank space in your email.

To prevent this, you should always set a default merge tag value. This ensures that your emails still look polished and personal, even if some contact data is missing.

For a full overview of merge tags, check out this article.


How to set a default merge tag

Use the following format:

{{ merge_tag|default:"your text here" }}

Adding |default:"your text here" tells Hive to use your default word or phrase if the contact doesn’t have that data stored in their profile.

You may notice that some merge tags in Hive—such as full name and first name—already come with default values built in.


Example

If you set the default value for the first name merge tag to "there", Hive will automatically insert "there" when a recipient has no first name saved.

{{ user.first_name|default:"there" }}  

Hi, → Hi there,

Did this answer your question?