Previewing personalized content
See how your personalized content will look when populated with data.
When adding or editing content that contains HandlebarsHandlebars is Airship’s templating language for personalization. Handlebars expressions use double curly braces wrapped around a content template, ranging from a simple variable, e.g., {{first_name}}
, to complex evaluations of personalization data., you can preview its appearance by enabling Preview Data and using JSON sample data representing a member of your audience, without having to send test messages. You can supply your own sample data or select a Preview GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview., and those users’ attributes will appear in the message preview.
Dashboard locations
The Preview Data option appears in these locations in the dashboard:
TemplatesReusable message content. Templates support personalization using merge fields and other logic. — Appears on all screens. Not available for In-App AutomationMessages cached on users’ devices and displayed when users meet certain conditions within your app, such as viewing a particular screen or opening the app a certain number of times. templates.
ComposersA tool for creating messages in the dashboard. Composers are defined by what you can include and control: message types, delivery, and automation. — Appears in different locations:
- Message, A/B Test, Automation, and Sequence — Appears on all screens. Not available for the In-App Automation composer.
- Sequence — Also appears on the PerformanceA report that compares audience behavior to a Sequence’s goal. It displays performance metrics and a link to the message report for each message in the Sequence. and ManageA preview of the messages in a Sequence, with options for editing and testing, and for running experiments. screens.
- Scene — Appears only when editing screens.
- For email, Message Center, and landing pages, previewing is available within the Interactive Editor only. See below.
Interactive EditorA tool for creating content for landing pages, Message Center, email, and In-App Automation. You can provide your own HTML or design using the drag-and-drop WYSIWYG option. — Appears in different locations:
- Text fields — Preview Data is available as you enter content for text fields (title, subject, plain text body, and uploaded or pasted HTML).
- WYSIWYG editor — Preview Data is available after you enter content. Click Preview to see your device previews, then enable Preview Data. Not available for In-App Automation templates.
After you select a preview group or enter your own sample data, it is available within Preview Data on any other screen within the same template, snippet, or message — you do not have to reenter it. However, within Sequences, Preview Data on the Performance and Manage screens operates independently of Preview Data available while composing messages.
You can click and hold to drag Preview Data to a new position on the screen.
Previewing personalized content using a preview or test group
- Enter content that uses Handlebars.
- Enable Preview Data.
- Click the search field and select or search for a preview group. The preview on the screen updates with the attributes of a user in your selected group.
- Click to select another user within the group, and the message preview will update with that user’s attributes.
- (Optional) Click JSON to view the data for the selected user.
- You can modify the field’s content and click Apply JSON to see the changes in the preview.
- After applying JSON changes for a user, you can click Reset JSON to restore the unedited data.
Previewing personalized content using your own JSON sample data
- Enter content that uses Handlebars.
- Enable Preview Data.
- Click JSON .
- Enter sample JSON, and click Apply JSON to see the changes in the preview.
- Click Apply JSON again after editing the data.
- Click Reset JSON to delete the field’s current content.
Tip This JSON object mirrors the
create_and_send
audience object.
JSON sample data for automation and sequences
If your template or message is for an automated message or sequence triggered by a custom event, you will want to use sample data based on that custom event.
Enter custom event properties representative of an audience member, mirroring the properties
object in a custom event. See also: Personalize messages using custom events.
The following are a custom event and the JSON you would enter in Preview Data for that event.
{
"occurred": "{{event_time}}",
"user": {
"named_user_id": "user"
},
"body": {
"name": "purchase",
"subscribe": true,
"properties": {
"customer_name": "user",
"total": 48,
"cost_units": "USD",
"purchase": [
{
"qty": 4,
"item": "MLB regulation baseball",
"per": "$12",
"total": "$48"
}
]
}
}
}
{
"total": 48,
"cost_units": "USD",
"purchase": [
{
"qty": 4,
"item": "MLB regulation baseball",
"per": "$12",
"total": "$48"
}
]
}
Categories