How to Personalize Banners with Visitor Names
In Fresh Relevance, you are able to dynamically add text to your banner images, on web or in email.
Any data against a Person Record can be used, such as the Visitors name. What’s more is that you can setup an appropriate fallback when this data is unknown. And if you’re emailing customers who are yet to have shopper records, you can pull information directly from your ESP – checkout part 2.
This How-To will show you how to add this dynamically to your Banner images – but the possibilities don’t end there! The same approach can be used to further personalize other SmartBlock content, such as Recommendation Headers “Our Top Picks for Daisy” or Countdown timers “Daisy, you’ve only got 4 hours left”
EXAMPLE
Merging Name from Person Records (Web & Email)
What is a Person Record
Every customer who visits your website will have a Person Record created in Fresh Relevance.
Initially each visitor will be assigned a unique identifier, which would be replaced by Person information once they Identify themselves, generally by email address. The data available for collection will depend on your website implementation, please contact our Support Team if you’d like to review your data collection opportunities.
For any data we’re unable to collect from website behavior, you’re able to Import Person Data with our Data Import Module.
Step 1 – Create your Banner
- Go to Content | SmartBlocks
- Navigate to the Banner tab (or another SmartBlock type if desired
- Click Create SmartBlock
- Select a Dynamic template – for banners this is on the Dynamic tab
Step 2 – Configure your SmartBlock
Work through the individual SmartBlock tabs to configure the look and feel.
Step 3 – Create Name Personalization
Adding name personalization uses some of our Jinja code to pull in the information. It requires an If statement to specify that if you find a customer’s name, use that variable, else show the fallback text.
Note that this syntax varies based on whether you are pulling the information from the Person Record or a Merge Parameter. To take from the Person Record use the following code:
{% if person.fn %}{{person.fn}}{%else%}fallback here{%endif %}
The output of this code would be the customer’s name, or if a name is not populated ‘fallback here’.
Add text before and after the code to construct a personable sentence:
Hi {% if person.fn %}{{person.fn}}{%else%}Customer{%endif %}
To output, for example “Hi Daisy” or “Hi Customer”
You can also leave the fallback blank:
Happy Birthday {% if person.fn %}{{person.fn}}{%endif %}
To output, for example “Happy Birthday Daisy” or “Happy Birthday” if name isn’t populated
Step 4 – Deploy
If you’re deploying via the Site Editor (Web only):
- Go to Content | Site Editor
- Select the appropriate Site Editor for your Experience, if applicable
- Click SmartBlocks and find your Name Personalized Banner
- Simply Drag and Drop your Banner into the appropriate location on your website
If deploying via Email or manually to the website:
- In your SmartBlock click Publish and Use
- Create your Slot
- In your newly created Slot, go to the Use tab
- Copy the code and deploy as normal, ensuring that you populate the email and any other applicable Merge Parameters
Merging Name from ESP Records (Email only)
Step 1 – Create your Banner
- Go to Content | SmartBlocks
- Navigate to the Banner tab (or another SmartBlock type if desired
- Click Create SmartBlock
- Select a Dynamic template – for banners this is on the Dynamic tab
Step 2 – Add name Merge Parameter
Merge Parameters allow you to access information outside of the Person Record, for example a field in your ESP. They work by passing data through the Slot code into your SmartBlock.
- Go to the Properties tab
- In the Merge Parameter field, type in the variable you want to pass through this data on, for example name
- Hit Enter on your keyboard to add the Merge Parameter
Step 3 – Configure your SmartBlock
Work through the individual SmartBlock tabs to configure the look and feel.
Step 4 – Personalize text with name
Adding name personalization uses some of our Jinja code to pull in the information.
Note that this syntax varies based on whether you are pulling the information from the Person Record or a Merge Parameter. To take from the Merge Parameter use the following code:
{{ merges.name or ‘fallback here’ }}
The output of this code would be the customer’s name, or if a name is not populated ‘fallback here’.
Add text before and after the code to construct a personable sentence:
Hi {{ merges.name or ‘Customer’ }}
To output, for example “Hi Daisy” or “Hi Customer”
You can also leave the fallback blank:
Happy Birthday {{ merges.name or ” }}
To output, for example “Happy Birthday Daisy” or “Happy Birthday” if name isn’t populated
Step 5 – Create Slot
In your SmartBlock, Click Publish and Use, which will walk you through the Slot creation process. You will notice that the Merge Parameters on the Slot will automatically pick up those set on the SmartBlock.
If adding name personalization to an existing SmartBlock/Slot, simply go to your Slot then add the Merge Parameter to the field on the Edit tab.
Step 6 – Adding to your email
Deployment is as normal, with an additional parameter in the code that you will need to populate:
- Find your ESP’s syntax for the Name field, this could be something like @name@
- Go to your Slot then click on the Use tab
- Under Edit ESP Merge Values there is a table where you can input your ESP value to automatically update your Slot code. In the row for name, in the ESP Field column add the field name identified in step 1.
Note that this update may also be required for email address and other fields, depending on the Personalization used - Click Update
- Copy the Slot code by clicking Copy to Clipboard
- Paste the Slot Code into your email built in your ESP
- Test and Send