Skip to main content

Been working on a snippet to populate a banner image based on the date the email is sent. how can I display an image based on the day an email is sent?

Hi Cameron McLeod !

You can use handlebar logic with the "now"  merge parameter. If you include handlebar logic to render the date and time of the campaign, send the time. For example- You can write the logic like so:

{{now format='MMMM dd, yyyy'}}

To render a date like "July 5, 2023" for an upcoming campaign, send it on July 5th. Please note, however, that this time is based on UTC time, and accounting for a timezone will need to be included in the logic if required. For example: {{now format="MMMM dd, yyyy" tz="America/New_York"}}.

Here is more information on how to use universal merge parameters: https://support.iterable.com/hc/en-us/articles/206514205-Universal-Merge-Parameters-

If you run into any issues, feel free to open a Support ticket for further assistance.

Best,

Julia


Reply