Guides & Tutorials

Personalizing the newsletter

How to personalize newsletters?

You can personalize both the content and the subject line of your newsletter. In order to do that, custom fields (parameters) have to be added to the email addresses. They can be names, personal codes, birthdays or whatever could capture the attention of your subscribers. You can read more about parameters from the Creating a segment (filter) tutorial. 

  1. To insert personalized content into your template, there are two options. Choose a prefered variable from the dropdown menu under “Insert” or do it manually.
  2. If you’re opting to do it manually, make sure that it’s added between double brackets {{parameter}}. The name of the parameter should be in all lowercase letters and have a unified format throughout.

The added parameter has to be written in the exact same format as the field in the database. If the database field says “firstname” then the necessary information will not be found when just writing {{name}}. In this case you have to write {{firstname}}.

If the filtered field of a contact is left empty in the database, nothing will be added to that field and the place where the value of the parameter should be added in the template will remain empty.

When some of the contacts are missing a value in the personalized field, you can replace it with a common name (e.g. customer, subscriber), so that when a customer receiving the newsletter has no name in the database it will be replaced with something else.

Personalized names

Simple personalized name:

Hello {{name}}!

When adding a parameter in the template or subject line, it will be replaced by the value of the parameter, when sending out the letter. In this case, the client would see their own name, example: Hello Judy!

Personalized name with an alternative:

Sometimes, not all the subscribers have their name added in the name field. When this happens you can use the next code:

Dear {{name}}{% if name == "" %}subscriber{% endif %}

In that case the contacts, who had a value in the name field, will be greeted by their name in the email (e.g. “Dear Judy”) and the ones who didn’t will be greeted as subscribers (e.g. “Dear subscriber”).

Second example:

{% if first_name != "" %}Hello {{first_name}}!{% endif %}{% if first_name == "" %}Hello!{% endif %}

When contacts have a first_name parameter filled, they will receive the welcoming as Hello Judy!
Name is personalized for each contact. If they don’t have first_name parameter with a value, they will see just Hello! in their newsletter.

Third example:

{% if first_name != "" %}Hello {{first_name}}!{% elif name != "" %}Hello {{name}}!{% else %}Hello, client!{% endif %}

This example is useful, when you have multiple name parameters in use. In this case, when “first_name” field has a value, the client will see their name. If the “first_name” parameter is empty, but the contact has a name in “name” parameter, then they will see their name, when receiving the letter. If both “first_name” and “name” fields are empty, then it will show: Hello, client!

Note! Use those parameters in personalizing, that you have added to the contacts in your Smaily account. Make the necessary changes in the codes, before using them.

Personalized URLs

There are two ways to personalize URLs in templates.

1) You can personalize the whole URL, so that the client will receive their unique link in the letter. To personalize the URL just add the parameter in the template. Note! You need to add the parameter with the unique URLs to the contact file and import it to your Smaily account. Example: {{here_url_parameter_from_excel}}

There will be no statistics collected when personalizing the whole URL. This personalization will only work inside the text field.

2) Another option is to personalize a part of the URL. In this case add the beginning of the URL and add a personalized part to the end. Example:{{here_parameter_from_excel}}

This type of personalization can be used both in text fields and in buttons. Also statistics will be collected regarding the URL.

Personalized content

You can also personalize other information that has been added to the contacts, for example loyalty points, customer information etc.


{% if number == "-" %} Thank you for being our customer. {% elif number !="-"%} Thank you for being our customer for more than {{number}} years.{% endif %}

In this example if the “number” field has a value “-” (empty), then the recipient will see this text in their letter: Thank you for being our customer.
But when the “number” field has any other value (usually a number in this case), they will see (example): Thank you for being our customer for more than 5 years.

{% if points != "" %}You have {{points}} loyalty credit available.{% endif %}

In this example, when the “points” value is not empty, the recipient will see how much loyalty credit is available for them. Example: You have 524 loyalty credit available.