Skip to content

Countdown Timers

Countdown timers that match your site: a sale that ends on a date, a personal offer window per visitor (for example 24 hours from their first visit) for offers that really end, or a daily cutoff. Add them anywhere on a page, or inside popups and bars, and choose what happens when time is up.

Beta. Countdown Timers is in beta: it works, but things may still break. If something breaks, report it.

On the store: Countdown Timers in Growth and conversion, pricing.

$7 USD per site · $21 USD for all your sites, paid once. Every purchase includes 12 months of updates, and there is a full refund within 7 days. Details: pricing.

  • Cloudflare® plan: Cloudflare free plan
  • Works on: Cloudflare Workers; Cloudflare Pages; A site on its own server (VPS or cloud) with DNS on Cloudflare, through a Worker route in front of it (beta, tested on a live server) (hosts)
  • Version: 0.6.5 (needs core 0.21.0 or later; it comes in the same download)
  • Runs on the Cloudflare free plan, in the same D1 database as your other site apps. No third-party script and no extra requests: the right time is written into the page as it’s served, and a tiny script (about 2 KB) keeps it ticking.
  • Timers are stored in the site’s shared tables, so Popups (and later funnels) can show them with nothing to set up. Install order doesn’t matter, and removing Countdown Timers leaves timers already used in popups working.
  • Evergreen timers set one small first-party cookie (_sc) to remember when each visitor first saw the timer. Nothing is sent anywhere.
  • Timers are inserted into pages as they’re served, so page views run through the site apps (as with link tagging and forms).
  • Cost per visit: no extra requests and no writes; the right time is drawn into the page as it is served. Past the Cloudflare free Worker request limit pages are served without timers until it resets at midnight UTC (or you upgrade). Visit sources are counted by core: page views are added up in memory and saved in a few small writes about every 20 seconds, within the daily write budget; at the Cloudflare free limits counting pauses and the site is unaffected.
  • Addresses it answers: none
  • Edits pages as they are served: yes
  • Has a say when a page is not found: no
  • Uses the site’s brand: yes
  • Core capabilities it uses: countdown
  • Database tables (in the site’s own D1 database): none

What the app sets in a visitor’s browser. Anything that is not necessary waits for consent.

Name Category Kept in Lasts What it is for
_sc preferences cookie 1 year Remembers when a visitor first saw an evergreen timer, so its clock keeps running between pages instead of starting over. (only on pages with an evergreen timer, and only if preferences are allowed (otherwise _scs keeps it for the visit))
_scs necessary cookie session When preferences aren’t allowed: keeps an evergreen countdown’s start for this visit only, so the clock doesn’t restart on every page (which would show a false deadline). No identifier, deleted when the browser closes. (only on pages with an evergreen timer, only if preferences are not allowed)

Countdown Timers adds 8 tools to the site’s own agent connection. The short text under each name is what an agent sees in its tool list; the full notes are what site_tool_help returns. The shared rules for confirm, dry_run and on apply to every tool.

List the site’s countdown timers (name, kind, deadline, status, where placed, embed tag).

Read only: changes nothing.

Takes no input.

Ready-made timers countdown_create_from_template can create (sale ends at a date, evergreen 24h, ends tonight…). Each says what it requires and what it leaves blank for you to fill in with countdown_save afterwards.

Read only: changes nothing.

Takes no input.

One timer in full, as countdown_save takes it.

Read only: changes nothing.

Field Type Required What it is
id integer no
name string no

Create a DRAFT timer from a template (see countdown_templates): not live, not placed on any page. Adjust it with countdown_save, then set it live (status:“live”) and show it with a placement or the embed tag. Only go live when the owner is happy.

Changes the site.

Field Type Required What it is
template string yes

Switch a timer between live and paused. Pages and popups stop showing a paused timer. Without on it flips, which is not safe to retry.

Changes the site.

Field Type Required What it is
id integer no
name string no The name, as in the matching get tool. Use this or id.
on boolean no true: on, false: off. Sets the state (safe to retry).

Set the site’s timezone (an IANA name like America/New_York) for timers that don’t pick their own. Empty string means UTC.

Changes the site.

Field Type Required What it is
timezone string yes

Create a timer (name or title, and kind with its deadline: fixed counts to at, evergreen gives each visitor minutes, daily counts to time) or change one (id plus only what changes: PATCH; placements, when sent, replace the list). Read the answer’s warnings.

Changes the site.

Full notes (what site_tool_help returns):

Read the saved values with countdown_get. evergreen: minutes from the visitor’s first view. The answer includes the embed tag; warnings say, for example, that the site timezone isn’t set or the deadline already passed.

Field Type Required What it is
id integer no
name string no Short name for the embed tag and popups: lowercase letters, digits, dashes.
title string no
kind "fixed", "evergreen", "daily" no
status "live", "draft", "paused" no
at string no Fixed: local date and time like 2026-11-27T23:59 (no offset), read in timezone.
timezone string no IANA zone for fixed and daily timers; omit to follow the site timezone.
minutes integer no Evergreen: how long each visitor gets.
hours number no Evergreen: same, in hours.
time string no Daily: the time it ends each day, HH:MM (“00:00” is midnight tonight).
weekdays list of integers no Daily: days it runs, 0 = Sunday. Empty = every day.
label string no Text before the numbers, e.g. “Sale ends in”.
style "inline", "words", "boxes" no
days boolean no
seconds boolean no
endAction "hide", "message", "redirect" no
endMessage string no
endUrl string no
hideBlock boolean no When it ends, also hide the popup or element around it.
placements list of objects no Pages to show it on without code; replaces the list.
dry_run boolean no true: save nothing; answers wouldSave (the full record) and the warnings.

Delete a timer. Pages and popups that use it stop showing it. DESTRUCTIVE: does nothing until called again with confirm:true.

Changes the site. Destructive: does nothing until it is called again with confirm.

Field Type Required What it is
id integer no
name string no The name, as in the matching get tool. Use this or id.
confirm boolean no Leave out first (the answer says what would happen); then true, with confirm_token.
confirm_token string no The answer’s confirmToken, sent with confirm:true and the same input.
  • Counts as actions: countdown.shown (Timer shown)

How events work: core events.

Connects with no setup, in any install order: Popups.