How can I setup an image to change based on recipient details?
There are two methods that you can use to setup an image to change based on recipient details. The method that will be best suited to your needs depends on the number of variations required as well as the extent to which you may want to reuse the structure.
For example, if you will require a different image to display for each recipient, you can add custom field(s) to hold image URLs for each contact. Custom fields can be used in both campaigns and templates.
Alternatively if you only require a small number of different images to be used, then you can setup dynamic content tag(s) to hold image URLs for specific conditions within a campaign. Note dynamic content tag(s) can only be inserted in an individual campaign. They cannot be setup in templates or shared to other users.
In this article
Custom Field(s)
In order to setup images to change based on specific recipient details, first you will need to ensure that the image you intend to use for each recipient is stored in an online location or in the Content Library. Then follow these steps to setup custom field(s) to display different images for different recipients:
- Add new free text or URL custom field(s) to store the URLs for the image(s) that will change within the template or campaign. Enter a fallback value for the image URL that should display in the event a specific URL is not found for a contact.
- Setup a spreadsheet of your contacts to include column(s) corresponding to the new custom field(s). The column for an image that will change must contain the URL for the image that should display for any contact where you do not want the fallback value image to display. If the image is stored in an online location of yours, enter the full URL in this column. Or if the image is stored in the Content Library, preview the image to obtain the URL from our system in your web browser's address bar.
- Once your spreadsheet is complete with image URL(s), import the list and map the image URL column(s) to the corresponding new custom field(s).
- Go to the Content step of an in progress campaign, and enter a mail merge tag using your new custom field(s) in order to obtain the tag. Copy the text within the brackets ([ ]). Since you do not want this text to appear in the final campaign, delete the tag or click the Home tab in the main navigation menu so your changes are not saved.
- Go to the Content step of the template or campaign where you want the changeable image to appear, and click the HTML icon to edit the HTML content.
- Determine if you want the images to appear at exactly the same dimensions as they are in their online location, or if you would like all of the images to be resized to a specific dimension (either width or height). Then enter the following details where you want the images to display, including the <>s:
- To display the images at exactly the same dimensions as they are in their online location:
<IMG src="[yourtaghere]">
where "yourtaghere" is replaced with the text you had copied from within the brackets of the mail merge tag for your custom field(s)
- To display the images at a specific width:
<IMG src="[yourtaghere]" width=XX>
where "yourtaghere" is replaced with the text you had copied from within the brackets of the mail merge tag for your custom field(s)
and "XX" is replaced with the width in pixels that the images should be resized to
- To display the images at a specific height:
<IMG src="[yourtaghere]" height=YY>
where "yourtaghere" is replaced with the text you had copied from within the brackets of the mail merge tag for your custom field(s)
and "YY" is replaced with the height in pixels that the images should be resized to
- To display the images at exactly the same dimensions as they are in their online location:
- Although a red x will display in the Content step due to the content being contained within a mail merge tag, proceed to the Preview and Send step and use the Recipient Preview feature to confirm your images are displaying as expected.
Dynamic Content(s)
In order to setup images to change based on specific recipient details, first you will need to ensure that the data you intend to use as a condition for each recipient (some examples may include City or another custom field that you have setup) is already stored in the system. If the data is not stored in the system, you will need to export the list of contacts, add the data in Excel or another spreadsheet program, and then import the contacts in order to map the new data to a specific field (which will be used in setting up the dynamic content tag as outlined below). You will also need to ensure that each image you intend to use is stored in an online location or in the Content Library. Then follow these steps to setup dynamic content tag(s) to display different images for different recipients:
- Obtain the URLs for each image you intend to use in either from an online location of yours or from the Content Library (preview the image to obtain the URL from our system in your web browser's address bar).
- Go to the Content step of the in progress campaign where you want the changeable image to appear, and place the cursor at the point where you wish to insert the dynamic content tag (it will be the placeholder for the images).
- From the Mail Merge drop down menu, select Dynamic Content (the last option).
- Click the Add Tag button (or Add a Tag text link if no tags exist).
- Enter a title for the tag. The title will display in your campaign content only as a placeholder.
- Under "Default Content", enter the HTML tag for the image that should display if no conditions are met for the recipient. To create an HTML tag for the image, you will need to use the following format, including the <>s:
<IMG src="http://yourimageurlhere">
where "http://yourimageurlhere" is replaced with the URL for your image - Under "Conditions", select the field, match rule, and value that should be used for your first condition. Then enter the HTML tag for the image that should display if that condition is met.
- For each image you wish to setup, click the Add Condition button, and repeat step #7 to detail the conditions under which that specific image should display.
- When you have finished entering all of the conditions, click the Add button.
- In the row for the dynamic content tag that you have just created, click the Use jump to link, or click the drop down arrow and select Use to insert the dynamic content tag into your campaign.