Dynamic content allows you to send personalized campaigns to multiple subscriber segments, all in a single send. For example, you could code an email campaign so it shows different product offers to different people based on their interests.
Below, we'll provide examples of how custom fields are used with dynamic content tags to create rules for who sees what. Then we'll guide you through importing and previewing your campaign.
TIP: Dynamic content is also available using our email builder, which provides the same results without any coding required.
Dynamic content tags
There are five options to show or hide content in an email campaign with a set of tags to use for each scenario. They are:
If a specified custom field contains any value, display some content.
To display content to subscribers with no value in the specified custom field, use:
[if:CustomField][else] Your content here... [endif]
If a specified custom field equals a specific value, display some content.
If a specified custom field equals a specific value, display some content, otherwise display alternative content.
If a specified custom field equals a specific value, display some content, or else if a specified custom field has a specific value, display some other content. If there is no match in either scenario, display alternative content.
If member of
If a subscriber is in any of the given lists or segments, display some content. You can put multiple list and segment names in this condition, separated by commas. They will be interpreted as OR statements.
[ifmemberof:"List One","List Two|Segment"][endif]
Import and preview your campaign code
When you've finished designing your email, including the dynamic content tags, follow our instructions for importing a campaign.
You'll see a notification when the campaign has been successfully imported:
The system detects campaigns with dynamic content so when you click Preview it, you'll get a pop-up preview that includes a sidebar to toggle through the different content options you've coded.
Click through each version to make sure it looks like it should for the intended recipients:
If you need to change anything you can use the in-app editor. Just select Edit the HTML, below "What would you like to do" then click Next to open the editing window:
Alternatively, you can edit the HTML file on your computer then re-import the campaign. When you're happy with all versions of the HTML preview, click Next to create the plain text version of the campaign.
Just like a regular campaign, clicking import it from your HTML (see below) will give you a starting point for the plain text version. If your dynamic content tags surround text only and not HTML code, your content will be imported exactly as you marked it up.
Here's what the text-only portion of our earlier example looks like:
Because HTML elements aren't supported in plain text emails, dynamic content tags containing HTML won't be imported. You may be able to edit the imported plain text version so it makes sense, but in some cases it's easier to write your plain text version from scratch – either using different rules, or not using dynamic tags at all.
When your text-only version is ready, preview it by clicking the "Text" preview link on the campaign snapshot page:
In the pop-up window, click through each version to make sure it looks like it should for the intended recipients:
Click Print preview to disregard dynamic content tags and view all of the content in your email.
Test your dynamic content tags
Dynamic content campaigns allow you to test your data-driven content by choosing a random recipient's details to test personalization, as shown here:
You can also select Send the test using the fallback terms to send yourself a generic, non-personalized version of the campaign. In this case "fallback terms" refers to the content a recipient will see if:
- their default or custom field value does not match the value you have created personalized content for, or:
- a value for the field is not provided.
While you are getting started with dynamic content we recommend sending multiple tests, to help you understand what your different recipients will see.