Personalize emails with Dynamic Content
Put one tag in an email and show each subscriber the right version of a block, chosen by rules and segments at send time.
A dynamic block is a piece of email HTML with several versions. You put one tag in your email, such as {{block:hero_cta}}, and each subscriber gets the version that fits them when the email is sent.
Before you start
- Dynamic Content is included in the Pro plan. See plans and billing.
- You'll write block content as HTML, and variants, criteria and conditions as JSON.
- Segments on this page are a separate list from Send → Audience Segments. A segment made in one doesn't appear in the other.
Create a block
- 1Go to Automations → Dynamic Content, open Content blocks and click New block.
- 2Enter a Slug / name (unique). It can use letters, numbers, dashes and underscores.
- 3Choose a Type. It's a label for your own sorting and doesn't change how the block behaves.
- 4Set Status to active. New blocks start as draft.
- 5Enter Default HTML: what subscribers see when no variant matches.
- 6Add Variants as a JSON array, then click Create block.
- 7Use the copy button on the block's card to copy its tag, and paste the tag into your email's HTML.
A block that isn't active renders as nothing. It doesn't fall back to Default HTML, so the space in the email is blank. The same happens if the slug in the tag doesn't exactly match a block, including upper and lower case, or if you rename a block after using its tag.
[
{ "name": "vip", "content": "<b>Thanks for being a VIP</b>", "segmentId": "PASTE_SEGMENT_ID" },
{ "name": "new", "content": "<p>Welcome aboard</p>" }
]Add segments and rules
There are two ways to choose a variant. Use a segment when a variant belongs to one group. Use a content rule when you want a set order of checks.
- 1To add a segment, open Segments, click New segment, enter a Name and Criteria, and save.
- 2To add a rule, open Content rules and click New rule. This button stays off until you have a block.
- 3Enter a Rule name, then choose the Block and Variant.
- 4Set Status to active. Set Priority: higher numbers are checked first. The default is 10.
- 5Enter a Condition as JSON, then click Create rule.
{
"operator": "AND",
"conditions": [
{ "field": "status", "op": "eq", "value": "active" },
{ "field": "tags", "op": "contains", "value": "vip" }
]
}How a version is chosen
- 1If the block isn't active, nothing is shown.
- 2Active rules for the block are checked from highest Priority down. The first match wins and its variant is shown. An empty condition matches everyone.
- 3If no rule matches, variants with a segment are checked in the order you listed them. The first match wins.
- 4If nothing matches, Default HTML is shown.
Conditions and criteria
A simple check has field, op and value. Combine checks with "operator": "AND" or "operator": "OR" and a conditions list. An op not in this table never matches.
When an email is sent, only six fields are available: email, status, firstName, lastName, tags and source. A segment count can also match on plan, createdAt or customFields, but a check on those fields won't match real subscribers at send time. Build on the six fields above.
| op | Matches when the field |
|---|---|
eq, neq | equals, or doesn't equal, the value |
gt, gte, lt, lte | is greater or less than the value (dates and numbers) |
contains, not_contains | contains the value, or a list such as tags has that entry (not case-sensitive) |
in, not_in | is one of a list of values, or isn't |
exists, not_exists | has a value, or doesn't |
is_empty | is blank or an empty list |
Preview before you send
Open Preview, choose a Block and optionally a Segment (optional), and click Run preview. A badge shows Default content or Matched variant.
Preview uses a made-up subscriber built from the segment, not a real person, and it also works on blocks that aren't active. It can show a variant that real subscribers won't get, so also use Send test copy on a broadcast.
A test copy to an address on your list uses that subscriber's data. Any other address has only an email field to match on.
Where blocks render
- The tag works in the HTML of broadcasts, sequence emails and test copies.
- It doesn't work in subject lines, plain-text versions or landing pages. There the tag stays as typed.
- Merge tags such as
{{first_name}}work inside a block, because blocks are filled in first. - Blocks are filled in by an internal service at send time. There's no public API for it.
What Analytics shows
- Opens (period) and Clicks (period) cover all your email in the last 7 days, not only email with blocks.
- usage counts each time a block was filled in, including test copies.
- The opens and clicks percentages per block aren't calculated yet and always show 0.0%.
What can go wrong
- Everyone got the default content. If the internal service that picks versions can't be reached, each tag becomes the block's default content (nothing for a block that isn't active). A subscriber never receives the raw
{{block:...}}tag. There's no warning in the app. - A blank space in the email. The block isn't active, or the tag's slug doesn't match.
- "Variant not found in block" when saving a rule. The list offers default, but it only works if the block has a variant with that name. To show default content, leave the rule out.
- "A block with this name already exists". Slugs are unique in your account.
- "N rules reference this block. Delete them first." Delete the block's rules, then the block.
- "Segment is used by block variants". Remove the
segmentIdfrom those variants first. - "Dynamic Content (Pro) is not included in your plan. Upgrade to unlock it." Shown when you create a block on another plan.
- A segment count looks low. Counts include only active subscribers, and refresh when you save or reload the list.
Frequently asked questions
Does the block Type change how a block is chosen?
No. Type is a label. Rules, segments and Default HTML decide what shows.
Can I use my Audience Segments here?
No. Dynamic Content has its own Segments tab with its own criteria.
Can I target by behavior, such as opens or purchases?
Not directly. Only email, status, firstName, lastName, tags and source are available at send time. A behavior rule can add a tag when someone clicks or buys, and you can target that tag.
Ready to try it?
Open your dashboard and follow along — or create a free account.