Sub topic 4
Testing Personalization and Fallback Values
This chapter assumes you know what a merge tag is, have a seed list, and can send a test from your platform. It covers how to confirm that personalized fields render correctly for every kind of contact, including contacts with missing data.
What goes wrong
A merge tag is a placeholder that your platform replaces with a value from each contact's record. Personalization fails when the record has no value for the field. The common failures are:
- A blank gap: "Hello ,"
- Raw tag text: "Hello {{ first_name }},"
- A placeholder value stored in the data, such as "Test", "N/A" or "null"
- A wrong value, such as a name in all capitals or a company name in the first-name field
- A sentence that no longer makes sense once a value is missing
A test send to your own address almost never shows these problems. Your own record is complete, so you only see the happy path.
Define fallback values
A fallback value is the text your platform uses when a field is empty. Many platforms set it inside the tag. The syntax differs between platforms, so check your platform's documentation.
Hello {{ first_name | default: "there" }},
Thanks for being a customer since {{ signup_year | default: "the beginning" }}.Write each fallback so the sentence reads naturally with it. "Hello there," works. "Hello customer," often sounds stiff. Also check that the sentence works for every value the field can hold. "Since 2019" and "since the beginning" both fit this example.
Build seed contacts for edge cases
Add test contacts to your seed list that cover the cases real data produces:
| Seed contact | first_name | signup_year | What it tests |
|---|---|---|---|
| Complete | Maria | 2019 | Normal rendering |
| Empty fields | (empty) | (empty) | Fallback values |
| Whitespace only | a single space | (empty) | Fields that look empty but are not |
| Long value | A very long name | 2019 | Layout wrapping |
| Special characters | Zoë O'Brien | 2019 | Accents and apostrophes |
| Wrong case | MARIA | 2019 | Capitalization problems |
The whitespace case matters because some platforms treat a single space as a real value and skip the fallback. Imports from spreadsheets often create these records.
Run the test
Do not use that. Use the diagram below in the chapter instead.
Follow these steps:
- Send the test to all the seed contacts, using the same send path as a real send. Some platforms render previews differently from actual sends.
- Open each received message and read the whole message, not only the greeting. Personalization often appears in the subject line, preheader, body, button text and link URLs.
- Compare each message against the table above. Note any raw tags, gaps or awkward sentences.
- Fix the template or the data, then send again. Do not assume a fix worked.
Common errors
- Testing only a preview. Previews often substitute sample data. Verify with a real test send.
- Fixing the template but not the data. If many contacts have "N/A" as a first name, a fallback never fires. Clean the data or add a rule for it.
- Conditional blocks left unchecked. If your platform supports "show this paragraph only if..." logic, test a contact for each branch.
- Wrong field name. A tag such as
{{ firstname }}instead of{{ first_name }}may silently render blank. Compare tag names against your platform's field list.
Exercise
A test send to your own address shows "Hello Maria," correctly. Why is this not enough, and what should you do?
Show answer
Your own record has a complete firstname, so the test never exercises the fallback. Add seed contacts with an empty firstname, a whitespace-only value and unusual characters, send to all of them, and read each message, including the subject line and preheader.