How to add a countdown to an email template
Starting with version 2.1.15, MailWizz supports countdowns for email templates.
To get started, all you have to do is to click on the Available tags from the campaign template step and
you will see the COUNTDOWN tag with all its possible options
Copy the the tag in your email template and you will have the countdown ready with default options.
The default counter will look like:
Let's breakdown the tag structure:
[COUNTDOWN until='2022-07-11 23:34:57' size='medium' text-color='db9842' background-color='ffffff' show-circle='yes' circle-background-color='ffcccc' circle-foreground-color='ff0000' max-frames=60 show-text-label='yes']
- until
- Accepts a string that can be a date in the format 'Y-m-d H:i:s' (ex. 2022-12-30 01:01:01) or an expression like '+3 days'. We are having a restriction to a period no longer than 14 days.
Any value that results in a date longer than 14 days will default to 14 days. If somehow the value translates into a date in the past, the counter will be 00:00:00:00.
The timezone used will be UTC.
- size
- Accepts 3 values: 'medium', 'small' and 'large'.
The 'medium' is having a size of 400x100 pixels, the 'small' is 240x65 pixels and the large is 800x200 pixels.
It defaults to medium.
- text-color
- Accepts any color in hex, just without the # symbol. So for #000000, you will use only '000000'.
- background-color
- Same as text-color.
- show-circle
- Whether to show a circle to measure the depleted time around the counter numbers. It accepts 2 values: 'yes' or 'no'.
- circle-background-color
- See the text-color.
- circle-foreground-color
- See the text-color.
- max-frames
- The generated animated gif maximum frames. Its value is restricted to a minimum of 60 and a maximum of 180. This means the generated counter will be able to show animation between 60 and 180 seconds.
- show-text-label
- Whether to show the text labels for days/hours/minutes/seconds. It accepts 'yes' or 'no' as a value.