API & Docs

You can make widgets dynamically by customizing their parameters in your code. This way you don't have to visit our site every time you need to make, edit or remove a counter.

Below you'll find examples and a full description of customizable options. If you have any questions or suggestions, feel free to contact us.

Note: Dynamic widgets will contain a link to TickCounter. If you wish to remove it, please drop us a line.

Demo

Countdown
<a data-type="countdown"
 data-name="Sale ends in:"
 data-bg_color="#97B8FF"
 data-name_color="#008922"
 data-border_color="#888888"
 data-dt="2025-01-01 12:30:55"
 data-timezone="America/Chicago"
 style="display: block; width: 100%; position: relative; padding-bottom: 25%"
 class="tickcounter"
 href="//www.tickcounter.com"
 >Countdown</a>
<script>(function(d, s, id) { var js, pjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//www.tickcounter.com/static/js/loader.js"; pjs.parentNode.insertBefore(js, pjs); }(document, "script", "tickcounter-sdk"));</script>
 
Try it out at CodePen

Attributes

All fields are optional as each of them has a default value.

Common (all widget types)

Name Example value Default value Notes
data-type ticker countdown Widget type. Choices:
  • countdown
  • countup
  • clock
  • ticker
data-name Hello widget! My Countdown Name of your widget.
Up to 100 characters.
data-name_color rgba(1, 255, 3, 1) #3B5998 Widget name color. Use either HEX or RGBA values.
data-bg_color rgba(1, 255, 3, 1) #FFFFFF Widget background color. Use either HEX or RGBA values.
For transparent background use:
rgba(0,0,0,0)
data-border_width 0 1 Widget border width in pixels. Use 0 to remove border completely.
data-border_color rgba(1, 255, 3, 1) #E6E6E6 Widget border color. Use either HEX or RGBA values.
data-show_name false true Specifies whether to display the name of the widget.
data-layout horizontal vertical Widget layout: vertical or horizontal.
data-widget_horizontal_padding 200px 0% Total horizontal padding of the widget.

Countdown

Name Example value Default value Notes
data-dt 2050-01-01 12:30:15 (next New Year's Eve) Target date and time. Format:
YYYY-MM-DD HH:MM:SS
data-timezone America/New_York UTC Timezone for provided date.
Any of IANA codes (column TZ*)
data-digits_color rgba(1, 255, 3, 1) #000000 Color of the time units in timer. Use either HEX or RGBA values.
data-last_unit_color rgba(1, 255, 3, 1) #FF0000 Color of the last time unit in timer. Use either HEX or RGBA values.
data-show_units false true Specifies whether to display unit names in widget.
data-on_finish keep_counting stop_counting
  • stop_counting will stop counting on 0
  • keep_counting will start to count up the missed time (with a minus sign)
data-units hms dhms Time units to display (joined in one word without spaces). Choices:
  • y (years)
  • m (months)
  • w (weeks)
  • d (days)
  • h (hours)
  • m (minutes)
  • s (seconds)
data-language pt_BR en Language in which units are displayed. Choices:
  • ar (العربية, Arabic)
  • id (Bahasa Indonesia, Indonesian)
  • ms (Bahasa Melayu, Malaysian)
  • bn (বাংলা, Bengali)
  • nb (Bokmål, Norwegian)
  • bs (Bosanski, Bosnian)
  • bg (български език, Bulgarian)
  • ca (Català, Catalan)
  • cs (Čeština, Czech)
  • cy (Cymraeg, Welsh)
  • da (Dansk, Danish)
  • de (Deutsch, German)
  • et (eesti keel, Estonian)
  • et (en, English)
  • el (Ελληνικά, Greek)
  • es (Español, Spanish)
  • fo (føroyskt, Faroese)
  • fa (فارسی, Persian)
  • fr (Français, French)
  • gl (Galego, Galician)
  • sq (Gjuha shqipe, Albanian)
  • gu (ગુજરાતી, Gujarati)
  • ko (한국어, Korean)
  • he (עברית, Hebrew)
  • hr (Hrvatski jezik, Croatian)
  • hy (Հայերեն, Armenian)
  • is (Íslenska, Icelandic)
  • it (Italiano, Italian)
  • kk (қазақша, Kazakh)
  • lv (Latviešu Valoda, Latvian)
  • lt (lietuvių kalba, Lithuanian)
  • mk (македонски јазик, Macedonian)
  • hu (Magyar, Hungarian)
  • ml (മലയാളം, Malayalam)
  • my (မြန်မာစာ, Burmese)
  • nl (Nederlands, Dutch)
  • ja (日本語, Japanese)
  • uz (O‘zbek tili, Uzbek)
  • th (ภาษาไทย, Thai)
  • pl (Polski, Polish)
  • pt_BR (Português, Portuguese)
  • ro (Română, Romanian)
  • ru (Русский, Russian)
  • sk (Slovenčina, Slovak)
  • sl (Slovenščina, Slovenian)
  • sr (српски језик, Serbian)
  • fi (suomi, Finnish)
  • sv (Svenska, Swedish)
  • vi (Tiếng Việt, Vietnamese)
  • tr (Türkçe, Turkish)
  • uk (українська мова, Ukrainian)
  • ur (اُردوُ, Urdu)
  • zh_CN (简体中文, Chinese Simplified)
  • zh_TW (繁體中文, Chinese Traditional)
data-font Arial Helvetica Font style of the widget. Choices:
  • Arial
  • Helvetica
  • Verdana
  • Times New Roman
  • Courier New
  • Bebas Neue
  • Boogaloo
  • Caveat
  • Fahkwang
  • Lato
  • Noto Sans
  • Open Sans
  • Press Start 2P
  • Roboto
  • Roboto Condensed
  • Roboto Mono
  • Source Sans Pro
  • Syne Mono
  • Ubuntu
  • VT323
  • Xanh Mono

Count-up

Name Example value Default value Notes
data-dt 2000-01-01 12:30:15 (last New Year's Eve) Target date and time. Format:
YYYY-MM-DD HH:MM:SS
data-timezone America/New_York UTC Timezone for provided date.
Any of IANA codes (column TZ*)
data-digits_color rgba(1, 255, 3, 1) #000000 Color of the time units in timer. Use either HEX or RGBA values.
data-last_unit_color rgba(1, 255, 3, 1) #FF0000 Color of the last time unit in timer. Use either HEX or RGBA values.
data-show_units false true Specifies whether to display unit names in widget.
data-units hms dhms Time units to display (joined in one word without spaces). Choices:
  • y (years)
  • m (months)
  • w (weeks)
  • d (days)
  • h (hours)
  • m (minutes)
  • s (seconds)
data-language pt_BR en Language in which units are displayed. Choices:
  • ar (العربية, Arabic)
  • id (Bahasa Indonesia, Indonesian)
  • ms (Bahasa Melayu, Malaysian)
  • bn (বাংলা, Bengali)
  • nb (Bokmål, Norwegian)
  • bs (Bosanski, Bosnian)
  • bg (български език, Bulgarian)
  • ca (Català, Catalan)
  • cs (Čeština, Czech)
  • cy (Cymraeg, Welsh)
  • da (Dansk, Danish)
  • de (Deutsch, German)
  • et (eesti keel, Estonian)
  • et (en, English)
  • el (Ελληνικά, Greek)
  • es (Español, Spanish)
  • fo (føroyskt, Faroese)
  • fa (فارسی, Persian)
  • fr (Français, French)
  • gl (Galego, Galician)
  • sq (Gjuha shqipe, Albanian)
  • gu (ગુજરાતી, Gujarati)
  • ko (한국어, Korean)
  • he (עברית, Hebrew)
  • hr (Hrvatski jezik, Croatian)
  • hy (Հայերեն, Armenian)
  • is (Íslenska, Icelandic)
  • it (Italiano, Italian)
  • kk (қазақша, Kazakh)
  • lv (Latviešu Valoda, Latvian)
  • lt (lietuvių kalba, Lithuanian)
  • mk (македонски јазик, Macedonian)
  • hu (Magyar, Hungarian)
  • ml (മലയാളം, Malayalam)
  • my (မြန်မာစာ, Burmese)
  • nl (Nederlands, Dutch)
  • ja (日本語, Japanese)
  • uz (O‘zbek tili, Uzbek)
  • th (ภาษาไทย, Thai)
  • pl (Polski, Polish)
  • pt_BR (Português, Portuguese)
  • ro (Română, Romanian)
  • ru (Русский, Russian)
  • sk (Slovenčina, Slovak)
  • sl (Slovenščina, Slovenian)
  • sr (српски језик, Serbian)
  • fi (suomi, Finnish)
  • sv (Svenska, Swedish)
  • vi (Tiếng Việt, Vietnamese)
  • tr (Türkçe, Turkish)
  • uk (українська мова, Ukrainian)
  • ur (اُردوُ, Urdu)
  • zh_CN (简体中文, Chinese Simplified)
  • zh_TW (繁體中文, Chinese Traditional)
data-font Arial Helvetica Font style of the widget. Choices:
  • Arial
  • Helvetica
  • Verdana
  • Times New Roman
  • Courier New
  • Bebas Neue
  • Boogaloo
  • Caveat
  • Fahkwang
  • Lato
  • Noto Sans
  • Open Sans
  • Press Start 2P
  • Roboto
  • Roboto Condensed
  • Roboto Mono
  • Source Sans Pro
  • Syne Mono
  • Ubuntu
  • VT323
  • Xanh Mono

Clock

Name Example value Default value Notes
data-timezone America/New_York UTC Timezone for the clock.
Any of IANA codes (column TZ*)
data-twelve_hour_clock true false Specifies whether to display the time in 12-hour clock format.
data-show_date false true Specifies whether to display the date string under the clock.
data-time_color rgba(1, 255, 3, 1) #000000 Color of the time string. Use either HEX or RGBA values.
data-date_color rgba(1, 255, 3, 1) #505050 Color of the date string. Use either HEX or RGBA values.
data-font Arial Helvetica Font style of the widget. Choices:
  • Arial
  • Helvetica
  • Verdana
  • Times New Roman
  • Courier New
  • Bebas Neue
  • Boogaloo
  • Caveat
  • Fahkwang
  • Lato
  • Noto Sans
  • Open Sans
  • Press Start 2P
  • Roboto
  • Roboto Condensed
  • Roboto Mono
  • Source Sans Pro
  • Syne Mono
  • Ubuntu
  • VT323
  • Xanh Mono

Ticker

Name Example value Default value Notes
data-equation (0.8 * step) / 2 step + 1000 Formula to be calculated. step variable is the number of the current step. It starts with 0, then it's 1, 2, 3 and so on.
data-step_delay 5 1 Time between steps (in seconds). Defaults to one second.
data-dt 2000-01-01 12:30:15 (now) Start date for the ticker. Format:
YYYY-MM-DD HH:MM:SS
data-timezone America/New_York UTC Timezone for provided date.
Any of IANA codes (column TZ*)
data-decimal_places 4 2 Number of decimal places to show in a result.
Hint: Set it to an empty string to have it auto-calculated (not recommended due to "jumping digits").
data-unit_name USD, kg, pcs (empty) Unit name displayed right after the calculated value.
data-thousand_separator "," (comma)
" " (space)
(empty) Character to be used as a thousands separator.
data-decimal_separator "," (comma)
"." (dot)
"." (dot) Character to be used as a decimal separator.
data-value_color rgba(1, 255, 3, 1) #000000 Color of the output value. Use either HEX or RGBA values.
data-fraction_color rgba(1, 255, 3, 1) #FF0000 Color of the fraction part in output value. Use either HEX or RGBA values.
data-unit_name_color rgba(1, 255, 3, 1) #000000 Color of the unit name. Use either HEX or RGBA values.
data-font Arial Helvetica Font style of the widget. Choices:
  • Arial
  • Helvetica
  • Verdana
  • Times New Roman
  • Courier New
  • Bebas Neue
  • Boogaloo
  • Caveat
  • Fahkwang
  • Lato
  • Noto Sans
  • Open Sans
  • Press Start 2P
  • Roboto
  • Roboto Condensed
  • Roboto Mono
  • Source Sans Pro
  • Syne Mono
  • Ubuntu
  • VT323
  • Xanh Mono

Tip: Ticker does not work? No value or error is displayed? Most likely your equation field contains an error.

Width

By default, widget width is responsive. You can set it to a static value by changing:

<a class="tickcounter"
 style="display: block; width: 100%; position: relative; padding-bottom: 25%"
 ...
>

to:

<a class="tickcounter"
 style="display: block; width: 600px; height: 150px;"
 ...
>

Examples