How to insert a recipient’s first name in your emails – SendGrid


When sending emails, many senders wish to add a personal touch by dynamically inserting the recipient name into the subject line or greeting.

In order to insert a recipient’s first name in your emails, use the “Tags” section of the Single Send/Automations to grab the appropriate tagging. When you copy the Tag for first name, it initially includes a default placeholder (which is optional).

When you copy a tag from the Tags tab in the Marketing Campaigns editors, pasting the tag into your design will add a “default” automatically. The tag will look like the following example — the tag name followed by a pipe character and the word “default.” You can think of the pipe as the word “or.” This means the tag will be your recipient’s first_name or the word “default.”

{{ insert first_name ‘default=default’ }}. 

 

Tags tab in the Marketing Campaigns editors

Below are some examples of handlebar tags that will allow this replacement function, and you can learn more about this in detail in these documents here:

Understand default values and Handlebars

Substitution Tags with the Design Editor

 

blobid0.jpg

 

Clicking the tag will auto copy the required tag or you can copy this:

{{ insert first_name ‘default=default’ }}

 

Pasting this in the Subject line, this would render like the following:

 

When keeping the default-placeholder Tag as-is:

Hello {{ insert first_name ‘default=default’ }}!

 

A person whose contact field contains the first name “Sam” would render this way:

Hello Sam!

 

A person with no first name would render this way:

Hello default!

 

If you use the default placeholder tag, you must add a default value as well.

 

Modifying the default in the Tag:

Hello {{ insert first_name ‘default=you’ }}!

 

A person whose contact field contains the first name “Sam” would render this way:

Hello Sam!

 

A person with no first name in this case would render this way:

Hello you!

 

You can also use a simple handlebar tag of {{first_name}} (deleting insert and ‘default=default’ and any extra spaces from the Tag) to dynamically insert the recipient’s name.

Notice: there’s no need to use ‘insert’ if you’re not using the default placeholder.

 

Note: If the recipient does not have a first name listed in the contact, where the Tag is, it will render blank.



Source link

Leave a Comment