Skip to main content
MERGE TAG alias substitute placeholder

What is MERGE TAG, how to use it and what are Ecomail-defined merge tags. List of all merge tags.

Jan Tlapak avatar
Written by Jan Tlapak
Updated over a year ago

If you want to send 100 emails and you need to have a specific addressing and a different message in each one, without dealing with each email individually, use our merge tags.

1. Pre-defined merge tags

2. Merge tags in automation

3. Custom merge tags

4. Testing of merge tags


1. Pre-defined merge tags

Merge tags are special headwords that are replaced in a final email distribution by content relevant to each contact. You will create only one email (one template) and insert a placeholder password, ie a merge tag, instead of a specific name.

As you can see in the picture below, the merge tag for the address *|NAME|* was automatically replaced by the address “Monica” in the final email distribution. (In some countries you can use merge tag *|VOKATIV|* to address contacts in 5th grammatical case).

merge_tag

In order to write the values correctly, it is necessary to have relevant values for each contact. If the value does not exist for the contact, the merge tag has nothing to replace and an empty space remains after it.

To avoid empty content, you can use advanced conditioning to define what content to display to those who have value and which to those who do not have it.

First you need to import the contacts and possibly update them.

You can find out for example in the contact's details, if you have all the necessary information about contacts, you can find out, for example, in the contact details.

If you want to work with addresses for Czech contacts, just upload their first name (and possibly surname) - the application will automatically generate a name in the 5th case (or address by last name) within a few minutes, together with gender and name date.

For detection according to Slovak rules (ie addressing by the 1st case and other name dates), import the database with the value "SK" in the Country field.)

If you want to use a different merge tag than the title (eg the title before the name), take a look at the Ecomail-defined merge tags, or basic fields:

Overview of preset merge tags:

*|NAME|*                                    name
*|SURNAME|* surname
*|EMAIL|* email

*|VOKATIV|* name in 5th grammatical case
*|VOKATIV_S|* surname in 5th grammatical case

*|PRETITLE|* title before name
*|SURTITLE|* title after name

*|GENDER|* gender

*|UNSUB|* link for unsubscribe
*|WEBVERSION|* link for online version
*|PREFERENCES|* link for preferences settings

*|STREET|* Street
*|CITY|* City
*|ZIP|* ZIP code
*|COUNTRY|* Country

*|COMPANY|* Company
*|PHONE|* Telephone number

*|BIRTHDAY|* Birthday date
*|NAMEDAY|* Name day

*|ECM_ADDTAG_VALUE|* adds a tag with "value"

*|ECMID|* Ecomail ID

2. Merge tags in automation

An overview of preset merge tags that can only be used in automation:

*|ECM_COUPON|* special merge tag for imported discount coupon
*|ECM_LAST_COUPON|* special merge tag for sending last generated coupon for concrete contact

*|ECM_LAST_BOUGHT[1]|* last bought product
*|ECM_LAST_VIEW[1]|* last seen product

*|CAMPAIGN_ID|* ID of campaign which is being sent right now

3. Custom merge tags

If you need to insert your own merge tag into the template, which is not predefined in Ecomail, you must set it within the contact list in the Custom field section or create a field in the second step of importing contacts.

(Section "Custom fields" in Contact list)

(2nd step of contacts import)

Attention!

We recommend writing all merge tags (as well as system merge tags) in capital letters and without spaces - you can write the extended merge tag with "_",

eg *|PET_2|*

The merge tag of type integer (int) has a universal limit of 2,147,483,647!

For higher numbers, we recommend changing the type of the custom field to text (string).

If you want to write a link (eg to a button) to the template via a custom field (with the URL type):

a) upload a link with the protocol to the contact profile (eg https://ecomail.app/) and then use the standard wording of the merge tag in the template, eg *|YOURMERGETAG|*

b) upload to the profile only a link without a protocol (ecomail.app/) and then use the wording of the merge tag in the template in the form of eg https: //*** |YOURMERGETAG|***

[where replace YOURMERGETAG with a custom value from the "custom field" section]

For a merge tag of the date type, also create the date in the format YYYY-MM-DD, so that you can work with the date, for example in automation or segmentation.

Inserting merge tags into a template

If you have created a custom field and imported values for the contacts in the appropriate custom field, you can use the merge tags directly in the email template.

Write the text of the merge tag directly into the text of the newsletter, always in this mirror form:

*|OWNMERGETAG|*

Fill in the wording of the merge tag (OWNMERGETAG) according to the name of your own field, such as:

Alternatively, you can copy the merge tag to the template from the contact detail:

4. Testing of merge tags

Because the merge tag is replaced in each email by a unique value for the given email contact, in the test email the value cannot be written under the merge tag - therefore it is necessary to choose the option of random value or list values manually in the offered fields.

If you want to try merge tags with written values ​​from the relevant contacts, send a final email campaign to the testing list of contacts (which contains your addresses and the addresses of your colleagues).

If you want to try to test the value under the merge tags (from the data of the relevant contacts), send a final email campaign to the testing list of contacts (which contains your addresses and the addresses of your colleagues).

The application also tells you which merge tags you can't use and why - just hover over the label with the merge tag.

In this case:

- *|VOKATIV|* is predefined merge tag and will be replaced in a final email campaign by addressing by first name (if any)

- *|ECM_COUPON|* reports an error because the merge tag on a unique discount code can only be used in automation

- *|PREFERENCES|* reports an error because no preference groups have been created in the contact list

- *|HOME|* reports an error because it is not a predefined merge tag or a custom field created, so in reality the field does not refer to anything

Our TIP: Merge tags can be used not only in the content of the newsletter, but also directly in the subject of the email or in the content of the SMS message in the SMS campaign.

If you have any further questions regarding merge tags in Ecomail, you can contact us at support@ecomail.app


Did this answer your question?