An Introduction to Dynamic Content for Email Marketing
Simply put, targeted, relevant emails drive better results. With Dynamic Content, tailoring your email messages for each subscriber is easier than ever.
How Dynamic Content works
Now you can send unique content to each recipient from a single email based on what you know about your subscribers. For example, one email could display an image of a woman for your female subscribers but an image of a man if the recipient is male. As long as you’re storing the right data about your subscribers in your contact fields, this kind of dynamic content is easy.
Dynamic content, step by step
Although dynamic content technically does involve code, it’s easy for even the non-technical marketer to use in the drag & drop editor.
1. Drag an HTML block into your mailing where you want the dynamic section to start, clear out the text and insert this code to open your dynamic content section: [% if member:fieldgoeshere == "criteriagoeshere" %] (see tag library below for more), in which you specify the first criteria you want to target. Be sure to use the shortcut name for your fields, not the display name. You can view the difference on your Audience page by clicking Manage contact fields and then the pencil icon next to a field:
2. Insert your variable content by dragging in the content blocks (any content type, including text, video and images) you want the criteria to see.
3. To create a variation on that content for a different set of recipients, drag in another HTML block and insert the code that signifies you're on to the next variation.
4. Drag in the content blocks you want that set of recipients to see.
5. Repeat steps three and four for any other variations and for your default version.
6. Drag in a final HTML block, and insert the code that closes the dynamic section of your email: [% endif %]
7. Set up test contacts that fit the criteria of each set of recipients, send a test and see how one email can be personalized to fit each of your contacts.
Get personal with personalization tags
Always test your mailing before sending it to your audience to ensure your contact fields are entered correctly. Below are descriptions of the operators you'll use for dynamic content. All of your contact fields will work.
- Check your contact fields to make sure they're spelled right and case-sensitive. For example, [% if member:favorite-color == "Red" %] will only work for people with "Red," capital R, in the favorite-color field. [% elif member:favorite-color == "red" %] will only work for people with "red," lowercase r, in the favorite-color field.
- Use and/or logic to include multiple groups in a tag. Use greater than/less than/do not include logic to further personalize your mailing.
- It's possible to nest if statements if each statement or series of conditional statements has its own [% endif %].
- Dynamic content works best when contact field information is clearly defined, meaning there's one selection made. Because of this, we recommend using a field option like "Drop down menu" instead of "Checkbox menu."
- Create a test group where one contact fits each segment, and send a test first before sending to your audience.
Common use cases
If you want males and females to see different content:
The tag to open the section with female-specific content will look like this:
[% if member:gender == "female" %] Content for females goes here.
And the tag to open the section with male-specific content will look like this:
[% if member:gender == "male" %] Content for males goes here.
Don’t forget to add a default section for those whose gender information you do not have, and close out the section with an [% endif %] tag.
If you want to specify a segment that has multiple criteria:
To show a section of content to people named Kevin in Tennessee:
[% if member:first_name == "Kevin" and member:state == "TN" %]
Remember that when you add a variation, use elif instead of if. If is just for the opening tag.
If you want to include both "and" logic AND "or" logic:
To show a section of content to people named Martha in Tennessee or Michigan:
[% if member:first_name=="Martha" and (member:state=="TN" or member:state=="Texas") %]
If you want to exclude a particular group:
To make sure everyone except those who live in New York sees a section of content:
[% if member:city != "New York" %]
Note the ! that replaces the first =. This means does not equal.
If you want to specify a "greater than" or "less than" segment:
To show a section of content to contacts that are over 21 years of age:
[% if member:age > "21" %]
If you want to see what the whole string looks like:
To show one section of content to people who live in Boston and a different section to people who live in Charleston, and if you want to have a default section, here's how your entire string would look:
[% if member:city == "Boston" %]
Insert image and HTML block for Boston residents
[% elif member:city == "Charleston" %]
Insert image and HTML block for Charleston residents
[% else %]
Insert generic image and HTML block
[% endif %]
How does this look in my mailing?
You can insert dynamic content all in one block or in multiple blocks. Here's how your mailing will look in the drag & drop editor:
Those who should receive the Drums version will see this in their inbox, once you've added the rest of your dynamic content:
And here's the Guitar version: