Follow

Advanced Dynamic Content (HTML)

María Rico

MDirector offers you 2 ways of customizing your campaigns with dynamic content:

- By previously creating areas or blocks of content, based on the values of the custom fields of your subscribers list, you will be able introduce the dynamic content to your templates at a later date. See: How do I create dynamic content and insert it in my campaigns?

- And, there is another more advanced way to do this where you are be able to put the conditions of the dynamic content directly in the HTML of your campaign creative without having to previously define the blocks of content first.

All of the information needed to be able to create this type of content is available to you.

 

INDEX

  1. Introduction
  2. Content block
  3. Logical conditions
  4. MDirector fields list
  5. Logical operators list
  1. Introduction

The dynamic content inside a creative makes possible, so that with a single design and a single email, customised content can be sent to each of the subscribers based on their personal details.

Through the specific codes of the dynamic content, we can assign HTML blocks to a group of contacts that fulfil particular conditions.

For example, those people whose state is Madrid would see a certain dynamic content, and those in Avila would see a different one and those of Salamanca would see a different one again.

  1. Content block

A block of dynamic content is made up of different parts that will be shown when it meets its logical condition.

  • Block structure:

Every block must start with:

<!-- md-dc-if 'condicion'-->

Write down the text that you want to be seen in the event that this condition is met using HTML tags, even plain text if wanted.

For example, if we want to show a paragraph:

<p> This is an example of paragraph to write dynamic content blocks. </p>

If you want to add more parties with their respective conditions, use this syntax:

 <!-- md-elseif = 'condition' --> content to be displayed

As the last condition,you can enter a default text to be displayed when no previous conditions have been met, you will use the following tag followed by the default content:

<!-- md-else --> content by default

When you no longer want to enter more conditions, you close the block as follows:

<!-- md-dc-endif -->

  • The same block of content can have either one or several conditions:

Examples of dynamic content blocks:

 [IF]

<!-- md-dc-if 'PROVINCE=Madrid' -->

<img src=”GranVia.png” style=”width:300px; height:250px;”>

<!-- md-dc-endif -->

 

[IF-ELSE]

<!-- md-dc-if 'AGE>30 AND AGE<50' -->

<span>Dynamic1</span>

<!-- md-dc-else -->

<span>Dynamic2</span>

<!-- md-dc-endif -->

 

 [IF-ELSEIF-ELSE] 

<!-- md-dc-if 'CP=28001' -->

<span>Dynamic1</span>

<!-- md-dc-elseif 'CP=28010 AND NAME=”Ana” AND AGE>25' -->

<span>Dynamic2</span>

 <!-- md-dc-elseif 'CP=28012 AND AGE<45' -->

<span>Dynamic3</span>

 <!-- md-dc-else-->

<span>Dynamic4</span>

<!-- md-dc-endif -->

 

  • The first condition to be met will be the one displayed to the subscriber, following in a descending order.
  1. Logical conditions
  • Part of a block can have one or more conditions separated by 'AND'.
  • The condition refers to the value of one or more fields of the subscriber.
  • The condition fields can be MDirector standard fields like name, sex, State, etc… or they can also be custom fields.

 

  1. MDirector fields list
  • NAME
  • LASTNAME1
  • LASTNAME2
  • EMAIL
  • MOBILE
  • STATE
  • AGE
  • SEX
  • CITY
  • ZIP CODE
  • COUNTRY
  • BIRTHDATE (yyyy-mm-dd)
  • LASTNAMES
  • SRGENDER
  • GENDER

 

  1. Logical Operators List
  • =    equal to
  • !=   different from
  • <    less than
  • <=  less than or equal to
  • >    greater than
  • >=  greater than or equal to
  • CONTAINS
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk