ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Personalizing Email Content with CDP Attribute Data

Personalization is a crucial aspect of effective email marketing. By tailoring your emails to your recipients' needs, interests, and issues, you demonstrate that you understand them and want to help them. Personalization in Email is supported in:

Subject and preheader personalization

In email marketing, capturing the attention of your subscribers relies on three crucial elements: the sender name, subject line, and preheader. 

Using the attribute picker, you can easily reference specific customer information and create subject and preheader lines tailored to each recipient.

Знімок екрана 2023-05-22 о 16.06.09.png

Content personalization

Personalization in Email Visual Builder

The attribute picker is a feature in the Email Visual Builder that allows you to search for and select specific attributes for personalization purposes. You can use both single-value and multi-value attributes to personalize your email content. For example, you can use the customer's name, location, or past purchase history to create personalized content.

To use the attribute picker, simply click on the attribute picker icon, which will display a list of all available attributes you can choose from. You can then select the attribute you want to use, and it will be inserted into your email content. 

Learn more: about adding personalization to text, images, and button blocks. 

If you need to refer to a multi-value compound attribute, you need to iterate over an array of values using the iteration block in the email editor. 

Learn more: about how to use iterations for personalization.

Personalization in HTML Builder with liquid tags

If you choose to use the HTML builder, you can leverage liquid tags to personalize your email content. The Liquid is an open-source templating language that allows logical operators to control how to include content from the CDP attributes in your email templates. 

To create your message using liquid tags, you can declare the tags in the content editor. There are two types of tags you can use - output and conditional tags.

Output Tags

Output tags are used for displaying the attribute’s value. 

Let's say you want to create a personalized greeting for each recipient, including their name and country. You can use Liquid tags syntax to display the values of the name and country attributes in your message.

To customize the content of your emails, you can utilize attribute IDs, e.g. web_first_name and web_country_login (please note that these are examples and may not correspond to the actual attribute IDs in your specific CDP). By incorporating these attribute IDs into your email template as placeholders, you can create personalized greetings like "Hello {{web_first_name}} from {{web_country_login}}." When the email is sent, the placeholders will be replaced with the corresponding values of the first name and country attributes for each recipient. This will result in a tailored greeting, such as "Hello John from the United States."

Conditional Tags

Conditional tags allow you to provide attribute values for different conditions. The syntax for these tags depends on the type of condition:

  • If statement: for example, you want to offer a discount to customers who have previously made a purchase. To do this, you can use an if statement to check if a customer has made a purchase before and offer them a discount if they have. For instance:
{% if web_all_purchases_comp.quantity > 0 %}
<p>Thanks for shopping with us before! As a thank you, here's a 10% discount code: DISCOUNT10</p>
{% else %}
<p>Welcome to our store! Sign up for our newsletter to receive exclusive discounts and promotions.</p>
{% endif %}

In this example, we're checking if the customer has made any purchases, and if the quantity is greater than 0, we offer them a discount code. If not, we welcome them to the store and encourage them to sign up for the newsletter.

  • For loop statement: for example, you want to display a list of all the products on sale, which is a multi-value compound attribute. You can use a for loop to iterate through all the products, check if they have a sale price, and display a list of all the products currently on sale. For instance:
<h2>Products on Sale</h2>
<ul>
{% for product in web_products_added_to_cart %}
  {% if product.price < product.compare_at_price %}
    <li><a href="{{ product.url }}">{{ product.title }}</a> - {{ product.price | money }} (was {{ product.compare_at_price | money }})</li>
  {% endif %}
{% endfor %}
</ul>

In this example, we're using a for loop to iterate through all the products in the store and check if they have a sale price (i.e., if the current price is less than the original price). If a product has a sale price, we display its title, sale price, and original price in a list.

Remember: In Liquid syntax, attribute names are referenced directly by their names rather than using curly brackets.

Remember: The examples of attributes presented in the article are provided for illustrative purposes only, and their IDs and dimensions will differ from those in your CDP.

In conclusion, the use of personalized content in marketing has proven to be a powerful tool for businesses to connect with their audience and achieve better results. By leveraging conditional tags and personal attributes, marketers can deliver tailored messages to improve key metrics.

Learn more: about the liquid syntax