{"id":3077,"date":"2020-05-25T15:34:08","date_gmt":"2020-05-25T15:34:08","guid":{"rendered":"https:\/\/www.leadshook.com\/help\/?p=3077"},"modified":"2024-02-14T11:40:55","modified_gmt":"2024-02-14T11:40:55","slug":"how-to-add-a-timer-to-your-decision-tree","status":"publish","type":"post","link":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/","title":{"rendered":"How to add a timer to your Decision Tree"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p>In contrast to a countdown timer, here we will be looking at the opposite a timer ( counter ) that works like a stopwatch.<\/p>\n\n\n\n<p><strong>The code looks like this:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;p&gt;Timer Demo&lt;\/p&gt;\n\n&lt;p id=\"demo\"&gt;&lt;\/p&gt;\n\n&lt;script&gt;\nvar start = Date.now();\nsetInterval(function() {\n    \/\/ milliseconds elapsed since start\n    var delta = Date.now() - start; \n    \/\/ convert milliseconds to seconds\n    given_seconds = (Math.floor(delta \/ 1000)); \n    \n    \/\/ calculate hour\/mins\/sec's based on given seconds\n    hours = Math.floor(given_seconds \/ 3600);\n    minutes = Math.floor((given_seconds - (hours * 3600)) \/ 60);\n    seconds = given_seconds - (hours * 3600) - (minutes * 60);\n    \n    \/\/Format the time with two digits per hour\/mins\/sec's\n    timeString = hours.toString().padStart(2, '0') + ':' + \n      minutes.toString().padStart(2, '0') + ':' + \n      seconds.toString().padStart(2, '0');\n    \n    \/\/Print the current time so far\n    document.getElementById(\"demo\").innerHTML = timeString;\n\n}, 1000); \/\/ update about every second\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>Simply copy paste the code to the HTML section in your appearance settings.<\/p>\n\n\n\n<p>You can see a working demo of this here:<\/p>\n\n\n\n<p><a href=\"https:\/\/test2.leadshook.io\/survey\/ex8YutWr2DAW05wd5vmB18OMAeyreLfUPiedaKWh\">https:\/\/test2.leadshook.io\/survey\/ex8YutWr2DAW05wd5vmB18OMAeyreLfUPiedaKWh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In contrast to a countdown timer, here we will be looking at the opposite a timer ( counter ) that works like a stopwatch. The code looks like this: Simply copy paste the code to the HTML section in your appearance settings. You can see a working demo of this here: https:\/\/test2.leadshook.io\/survey\/ex8YutWr2DAW05wd5vmB18OMAeyreLfUPiedaKWh<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[620],"tags":[541,542,688,687],"class_list":["post-3077","post","type-post","status-publish","format-standard","hentry","category-scripts","tag-count","tag-counter","tag-stopwatch","tag-timer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to add a timer to your Decision Tree - LeadsHook Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add a timer to your Decision Tree - LeadsHook Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"Introduction: In contrast to a countdown timer, here we will be looking at the opposite a timer ( counter ) that works like a stopwatch. The code looks like this: Simply copy paste the code to the HTML section in your appearance settings. You can see a working demo of this here: https:\/\/test2.leadshook.io\/survey\/ex8YutWr2DAW05wd5vmB18OMAeyreLfUPiedaKWh\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/\" \/>\n<meta property=\"og:site_name\" content=\"LeadsHook Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/leadshook\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-25T15:34:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-14T11:40:55+00:00\" \/>\n<meta name=\"author\" content=\"Nik T\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@leadshook\" \/>\n<meta name=\"twitter:site\" content=\"@leadshook\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nik T\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/\"},\"author\":{\"name\":\"Nik T\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/4bfe37d814563cc729828b7055313f4d\"},\"headline\":\"How to add a timer to your Decision Tree\",\"datePublished\":\"2020-05-25T15:34:08+00:00\",\"dateModified\":\"2024-02-14T11:40:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/\"},\"wordCount\":70,\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"keywords\":[\"count\",\"counter\",\"stopwatch\",\"timer\"],\"articleSection\":[\"Scripts\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/\",\"name\":\"How to add a timer to your Decision Tree - LeadsHook Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\"},\"datePublished\":\"2020-05-25T15:34:08+00:00\",\"dateModified\":\"2024-02-14T11:40:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-add-a-timer-to-your-decision-tree\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add a timer to your Decision Tree\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"name\":\"LeadsHook Knowledge Base\",\"description\":\"LeadsHook Training &amp; Technical Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\",\"name\":\"LeadsHook\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"width\":350,\"height\":83,\"caption\":\"LeadsHook\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/leadshook\\\/\",\"https:\\\/\\\/x.com\\\/leadshook\",\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/leadshook\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/4bfe37d814563cc729828b7055313f4d\",\"name\":\"Nik T\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"caption\":\"Nik T\"},\"sameAs\":[\"http:\\\/\\\/www.LeadsHook.com\"],\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/author\\\/nik\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add a timer to your Decision Tree - LeadsHook Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/","og_locale":"en_US","og_type":"article","og_title":"How to add a timer to your Decision Tree - LeadsHook Knowledge Base","og_description":"Introduction: In contrast to a countdown timer, here we will be looking at the opposite a timer ( counter ) that works like a stopwatch. The code looks like this: Simply copy paste the code to the HTML section in your appearance settings. You can see a working demo of this here: https:\/\/test2.leadshook.io\/survey\/ex8YutWr2DAW05wd5vmB18OMAeyreLfUPiedaKWh","og_url":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/","og_site_name":"LeadsHook Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/leadshook\/","article_published_time":"2020-05-25T15:34:08+00:00","article_modified_time":"2024-02-14T11:40:55+00:00","author":"Nik T","twitter_card":"summary_large_image","twitter_creator":"@leadshook","twitter_site":"@leadshook","twitter_misc":{"Written by":"Nik T","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/#article","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/"},"author":{"name":"Nik T","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/4bfe37d814563cc729828b7055313f4d"},"headline":"How to add a timer to your Decision Tree","datePublished":"2020-05-25T15:34:08+00:00","dateModified":"2024-02-14T11:40:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/"},"wordCount":70,"publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"keywords":["count","counter","stopwatch","timer"],"articleSection":["Scripts"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/","url":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/","name":"How to add a timer to your Decision Tree - LeadsHook Knowledge Base","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/#website"},"datePublished":"2020-05-25T15:34:08+00:00","dateModified":"2024-02-14T11:40:55+00:00","breadcrumb":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.leadshook.com\/help\/how-to-add-a-timer-to-your-decision-tree\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.leadshook.com\/help\/"},{"@type":"ListItem","position":2,"name":"How to add a timer to your Decision Tree"}]},{"@type":"WebSite","@id":"https:\/\/www.leadshook.com\/help\/#website","url":"https:\/\/www.leadshook.com\/help\/","name":"LeadsHook Knowledge Base","description":"LeadsHook Training &amp; Technical Help","publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.leadshook.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.leadshook.com\/help\/#organization","name":"LeadsHook","url":"https:\/\/www.leadshook.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","width":350,"height":83,"caption":"LeadsHook"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/leadshook\/","https:\/\/x.com\/leadshook","https:\/\/www.linkedin.com\/showcase\/leadshook\/"]},{"@type":"Person","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/4bfe37d814563cc729828b7055313f4d","name":"Nik T","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","caption":"Nik T"},"sameAs":["http:\/\/www.LeadsHook.com"],"url":"https:\/\/www.leadshook.com\/help\/author\/nik\/"}]}},"_links":{"self":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/comments?post=3077"}],"version-history":[{"count":5,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3077\/revisions"}],"predecessor-version":[{"id":7066,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3077\/revisions\/7066"}],"wp:attachment":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/media?parent=3077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/categories?post=3077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/tags?post=3077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}