EmailTimer.App

Menu

Countdown timers in Mailjet

By Danish Mohammed. 6 min read

Mailjet ships a real countdown block for email, documents it clearly, and gives it one deadline for everyone. It also has two personalization systems with two bracket styles, and which one you use decides whether a per-contact timer sends at all.

Does Mailjet have its own countdown timer

Yes. Mailjet’s Email Editor article describes a Countdown Timer block that you drag in from the Content panel. Three sentences define it. “The timer is rendered as an image to ensure consistent display across all email clients.” “Once it reaches the specified end time, it will automatically stop and display 00:00:00:00.” And for the deadline: “The default timezone is based on your account settings”, with a dropdown of zones “such as UTC, EST, PST, and more”.

You choose which units to show, leading zeroes, spacing, a separator, colours, and a web-safe font. “Custom fonts are not supported.”

That covers a single sale with a single cut-off. The block has one end date set in the editor, so every contact counts down to the same moment, and after it passes they see zeros. A timer from here adds a deadline per contact and an expired image of your own.

Where the timer goes in Mailjet

Two blocks take a timer from elsewhere. The Image block offers Upload, Image Gallery and “Link: Directly use an existing image available online.” For one deadline shared by the whole send, paste the signed address there.

For the full snippet, use the HTML Block. “Drag the HTML Block to your campaign, then click on the button from the toolbar to open the HTML editor window”. A campaign can also be built entirely in code with the Code in HTML option, which Mailjet says is “only recommended for users with advanced HTML skills as no support will be provided for troubleshooting custom code.”

Two personalization systems

Mailjet’s Templating Language article separates two kinds of variable.

data variables read contact properties. They work in campaigns and transactional email alike, because “the system automatically replaces the value based on the Contact property objects.” The syntax is [[data:contactPropertyName]], and a default is [[data:contactPropertyName:"defaultValue"]]. Double curly braces also work for data, but Mailjet recommends the square brackets. With no default and no value on the contact, “a whitespace will be printed in the message.”

In the campaign editor you rarely type these. Mailjet’s personalization article has you click Variables, choose the property, and enter text in the “Default value” box.

var variables read values you send with the message. The syntax is {{var:variableName}}, with a default as {{var:variableName:"defaultValue"}}. The values come “through the Send API call (as part of the request body) or during the SMTP-relay session (as a custom header)”. Mailjet is blunt about campaigns: var “should not be used in Marketing templates or Campaign drafts”, because sending one “will result in a BLOCKED event due to a templating language error.”

For transactional sends, template language is off unless you turn it on. Mailjet says the properties that enable it default to “false” or “0”, and without them “the system interprets the templating language elements in the sent message as ordinary text strings”.

A deadline per contact

A timer from here is an image with a signed address, and the signature covers every parameter in it. A variable placed inside that address is filled in after signing, the signature stops matching, and every contact gets a blank, transparent image instead of the timer.

So the whole address travels as one value. On Growth or Agency, generate one signed address per contact with the REST API’s batch endpoint or from a recipient set exported as a CSV. Store it in a contact property named et_image_url, and make that property the entire src in an HTML Block:

{% if data:et_image_url %}
<img src="[[data:et_image_url]]" alt="Your offer ends soon" width="600" height="200" border="0" style="display:block; width:100%; max-width:600px; height:auto; border:0;" />
{% endif %}

The {% if data:... %} form is Mailjet’s own marketing example, and it keeps the image out for a contact with no address rather than printing an empty src. Mailjet now requires every block to be closed: “Missing {% endif %} or {% endfor %} triggers an error”. It also advises quoting attribute values, as in href="{{ var:url }}".

One gap in the documentation is worth knowing. Mailjet describes conditionals in Text elements and Template Language blocks for both marketing and transactional templates, and names HTML blocks only for transactional ones. If the {% if %} lines show up as text in your campaign preview, put them in Template Language blocks above and below the HTML Block instead.

You can put the variable in the Image block’s Link field instead, since Mailjet says variables can go in “image URLs in Image DnD elements”. Leave the default off there. Mailjet warns that “you cannot use a default variable inside the URL associated with an Image DnD element”, and that the editor “will strip it right away.”

For a transactional template, the same address can come with the API call instead: <img src="{{var:et_image_url}}" ...>, with et_image_url in the message’s variables and template language switched on.

What breaks in automations

Mailjet’s Email Automation article describes a workflow builder whose Send Email block uses contact properties through data variables. A Send Email block can also take var values from a webhook when Use data from webhook is enabled. Without that option, Mailjet says, the email “would only use regular contact data already stored in Mailjet”.

The word timer means something else in that builder. Its Timer Block is a delay, set as minutes, hours or days, a custom date, or a date property. Mailjet warns that a specific date set without repeating means “any contact who enters the workflow after that date will skip the timer step entirely”. The Countdown Timer block has the same weakness in a workflow email: one end date, so a contact who arrives late sees zeros. A per-contact address in et_image_url gives each contact their own deadline.

What your contacts will see

Mailjet’s block and ours are both images, so both depend on the client. Microsoft’s support page says “If only the first frame of the animation appears, you have animations, or animated GIFs, disabled.” The first frame of a timer from here is drawn with the time left in it, so that reader still sees a correct number. The email client support page covers the others, from what the mail vendors document rather than from my own inbox checks.

Testing before you send

In the campaign editor, Preview & Test, then Send a test mail, sends to “up to 10 recipients at any time.” The articles I read do not say whether a campaign test fills data variables from the recipient’s contact record. Send a test to an address that is a contact with a real signed address in et_image_url, and if the image is missing, check with a small live send before the full one.

Transactional templates document this more fully. Mailjet’s transactional editor article says “Before sending a test email, go to ‘Preview Email’ and enter placeholder values for any variables”. It also warns that “If a syntax error is identified in your test emails, the message will not be sent by Mailjet.”

Questions and answers

Does Mailjet have a countdown timer?

Yes. The Countdown Timer block in the Email Editor is rendered as an image, uses your account’s time zone by default, and stops at 00:00:00:00 when the end time passes.

Can the Mailjet countdown use a different deadline for each contact?

Not as Mailjet documents it. The block has one end date and time set in the editor. A per-contact deadline needs a signed address per contact, stored in a contact property such as et_image_url.

What is the difference between [[data]] and {{var}} in Mailjet?

[[data:...]] reads a contact property and works in campaigns and transactional email. {{var:...}} reads a value sent with the API call or SMTP session, and in a campaign it gets the message blocked.

Can I put a default value in a Mailjet image URL?

Not in the Image block’s URL. Mailjet says the editor strips a default from that field. Use an {% if %} block around the image instead.

Which plan covers a timer in Mailjet?

A single deadline for everyone fits the free plan, which includes 5,000 image opens a month. A deadline per contact needs addresses generated per contact, on Growth at $49 a month. The tiers are on pricing.

Sources

Related

Put a countdown in the campaign you are writing now

The free plan covers 5,000 opens a month with no card. Starter is $19 a month for 250,000.