Search MailerLite
Start typing to search

No results

No results

How to use variables in MailerLite

How to use variables in MailerLite

The term variables refers to data you can add to your newsletter that is unique for each subscriber; they are used to better target and personalize your email to improve engagement.

For example, you would use a personalized variable to enter the value of your subscriber’s name field into the body of your newsletter.

The data that you collect using the fields in your MailerLite signup form, is saved in the subscriber fields in each subscriber’s profile.

Every field, or custom field that you create, has its own label called a merge tag. Merge tags are used to insert personalized data from your subscriber’s profile into the campaigns you send.

The merge tag merges the information in the subscriber’s field into the variable’s position.

Personalized variables are an excellent way to personalize your campaign. For example; rather than writing “Hey guys!” or “Dear readers”, you can speak directly to each subscriber by using the name entered in their name field.

To add personalized variables to your campaign using the Drag and drop editor, we recommend using the Variable button {x}. This will allow you to choose from all of your available merge tags.

The variable button is found in your text input area when editing the content of a text block.

Click the Variable button and select which field you would like to use.

If you’re using a Rich-text editor, you’ll notice there is no variable button. To add personalized variables to your campaign in this editor, you can simply type the merge tag directly into your campaign.

Every field in MailerLite has an accompanying {$merge_tag}, including the fields you created yourself.

For example:

  • {$email} – inserts your subscriber’s email address.

  • {$name} – inserts your subscriber’s first name (if it’s available).

If you’re unsure what the merge tag is for a particular field, you can find it by following these steps:

  1. Navigate to Subscribers.

  2. Click the Fields tab.

  3. Find the field you want to use in a campaign and check the merge tag on the right.

If you wish to include a default value in the case that a subscriber has no data in a particular field, you can use the following format:

{$merge_tag|default:'Value'}

For example; if you want to create a default value for a case in which a subscriber has no name in their name field you may use something like this:

{$name|default:'Friend'}

Note: If a subscriber doesn’t have a value in the field that corresponds with the merge tag you added to your campaign, the space in which the merge tag was added will appear blank unless you add a default value.

Dynamic variables are like personalized variables, except they allow you to display unique links for each subscriber when you add them to a button block or hyperlink.

Available dynamic variables include:

  • {$url} – generates a web version link to your campaign.

  • {$unsubscribe} – generates a link to your campaign’s unsubscribe page.

  • {$forward} – generates a link to Forward to a Friend page.

These variables can be used and displayed only in RSS Campaigns. Below listed variables can be used in the subject line or in campaign content.

  • {$campaign_date} – displays the current date in a “yyyy-mm-dd” format.

  • {$feed_title} – displays the title of your feed.

  • {$last_post_title} – displays the title of your feed’s last post.

Variables may not work if you’re attempting to test them using a test email. Test emails allow you to preview the layout of a campaign and do not test full functionality.

To properly test your variables, make a duplicate of your campaign and send it to yourself as if you were a regular subscriber.

Personalized variables won’t appear for subscribers who do not have data in the field you’re inserting in your campaign. If no default variable is used, the personalized variable will simply appear as a blank space.

Still have questions?
If you have any questions, feel free to contact us at support@mailerlite.com. A member of our support team will gladly assist you.