How to Add a Countdown Timer to a Specific Date

Follow

This script counts down to a fixed date and time, which suits events, launches, and limited-time offers that are days, weeks, or months away. For a short countdown measured in minutes, see How to Add a Countdown Timer to a Classic Builder Page.

Countdown timer showing 49 days until June 26th event, with an RSVP form for a booth demo.

This is community code, not an official Unbounce feature. Unbounce Support can't troubleshoot custom code. Test it on a published page before relying on it, and work with a developer if you aren't comfortable editing HTML, JavaScript, and CSS.

Add the timer to your page

The script is hosted on GitHub as Add a Countdown to a Date.

  1. Add a text element with the default text 00 days 00 hrs 00 mins 00 secs and style it to match your page.
  2. Double-click the text element and open its source view. Wrap the innermost text in a span with id="timer", so it looks like this:

<span id="timer">00 days 00 hrs 00 mins 00 secs</span>

  1. Copy the script from the gist and add it to the JavaScripts section with placement set to Before Body End Tag.
  2. In the script, enter the date and time you're counting down to.
  3. Save and republish the page.