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


Dynamic content with 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. 

Remember: An empty string will be inserted if the attribute is not known for a particular customer. To avoid sending empty strings, it is advisable to segment your audience based on the attributes that are known or use default values for specific attribute.

Adding personalization to text

To personalize the text content, 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. When the email is rendered, the attribute will be replaced with its corresponding value from the customer's profile, if available. 

May-09-2024 15-34-46.gif

Adding personalization to image

By using attributes that hold image URL dimensions, you can tailor your email content with personalized images in emails.

Simply click on the attribute picker icon, which will display a list of all available attributes you can choose from. Using dynamic product URLs in your email campaigns allows you to display the exact products that the recipient has expressed an interest in, increasing the likelihood of a conversion. 

Warning: it is necessary for the attribute used in the image to hold the image URL; otherwise, the recipient may receive an email with a broken image. To prevent sending an empty image, you can indicate the default value in the image URL using the following syntax: {{image_url | default: 'https://me.instance.meiro.tech/sdk/images/some_image.png'}}. Use apostrophes instead of quotations.

Adding personalization to button

Access the attribute picker from the configuration settings tab to personalize the button. From there, you can select the desired attribute, which will be inserted inside the button. When the email is rendered, the attribute will be replaced with its corresponding value from the customer's profile, if available. 

May-22-2023 12-44-27.gif


Adding default values to attributes

It is possible that users may or may not have a specified value for some attributes. If no default value is specified, the value will not be displayed. To set a default value, use the "default" field in the text block and type in any value you want the user to receive in case there is no known value for the attribute. This ensures that users will see a default value if the attribute's actual value is unknown, instead of just seeing a blank space.

You can add default values to the subject and preheaders of your emails, or directly within Visual Editor to the text, button or image blocks.

You can specify a default or fallback value using the following syntax: {{attribute | default: "some value"}}. For example, if you have a field that says "Dear {{customer_db_name | default: "customer"}}" and the user's name is Ben, the personalized content will read "Dear Ben". But if the user doesn't have a value for this attribute, it will be displayed as "Dear customer".

To set a default value to some blocks inside Visual Editor, use the "default" field in the block and type in any value you want the user to receive in case there is no known value for the attribute.

May-09-2024 15-56-58.gif

Warning: To prevent sending an empty image, you can indicate the default value in the image URL using apostrophes instead of the usual quotation marks, so syntax should be: {{image_url | default: 'https://me.instance.meiro.tech/sdk/images/some_image.png'}}

Adding default values to multi-value compound attributes

It is possible that users may or may not have a specified value for some attributes. If no default value is specified, the value will not be displayed. To set a default value, use the "if" condition in the content block. 


Dynamic content with multi-value compound attributes

How to add iterations to content blocks?

Iterations can effectively solve various use cases, including displaying recently viewed products, highlighting abandoned baskets, suggesting recommended products, or replenishing products. Iteration enables you to dynamically populate the content of a block with data from a data source. 

Repeat for

In the repeat for the field, refer to the ID of the multi-value compound attribute (later, we will refer to it as a source attribute) stored under the Data Library/Attributes tab or the Administration/Attributes tab.

Item alias

The name that will be used to refer to each item in the source attribute. For example, if you are using a product catalog as your source attribute, the item alias might be "product" or "item".

Quantity

The maximum number of items will be displayed in the text block. If the source attribute contains more items than the limit, only the first n items will be displayed.

To demonstrate the usage of iteration, follow these steps:

  1. Select the block element you want to iterate.

  2. Go to the display tab on the top

  3. In the section Content Repeat, enable the toggle to allow iterations.

  4. In the repeat fore field, insert the ID of the multi-value compound attribute. For instance, it could be forms_submitted or all_products_purchased (note that these examples are provided for illustration purposes and will differ from the attribute IDs in your CDP).

  5. Specify the item alias that you will reference within the iteration.

  6. Set the limit quantity according to your requirements.

  7. To incorporate the multi-value attributes into your email content, use the item name followed by the dimension ID of the attribute enclosed within curly brackets. For example, {{item_name.dimension_id}}.

Assuming you have this multiple compound attribute and its attribute ID and dimension ID are:


Your configurations for using iterations to blocks might appear as follows:


Iterating Column Blocks

Using iterations, you can dynamically populate column blocks and their children, such as product images, names, prices, and more. Follow these steps to achieve this dynamic content display:

  1. Begin by adding a column block to your content page.
  2. Populate the column section with image and text elements or any other content required.
  3. Go to the Layer section and locate the column block. Click on it to access its configurations. 
  4. Determine the number of columns needed and set the width of the column block accordingly (e.g., set 33% for a three-item limit).
  5. At the bottom of the column block configurations, enable iteration. Fill in the data source field, item name, limit, and mock quality fields the same way as described above.
  6. Go to the column children section and fill them with attributes iterated using the item name followed by the dimension ID of the attribute enclosed within curly brackets. For example, {{item_name.dimension_id}}.
  7. Check the preview of the email to see how your email will look with the iterated columns.
  8. Send a test email to ensure the personalized content is populated correctly on various email clients and devices.

Nov-14-2023 10-32-28.gif


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 | default: [] %}
  {% if product_price < product_compare_at_price %}
    <li>
      <a href="{{ product.url }}">{{ product.title | default: 'Unnamed Product' }}</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