Time On Page

Show the user how long they have been on the page for.

About This Script

Add this to your page by pasting the code (below) anywhere inside the <body> tag you would like it to appear.

Demo

Code

<script> (function(){ var timeOnPage = 0; function incremementTimeOnPage() { ++timeOnPage; showtimeOnPage(); } function showtimeOnPage() { var hours = (timeOnPage / 3600) % 24; var minutes = (timeOnPage / 60) % 60; var seconds = timeOnPage % 60; var str = ''; if (hours >= 1) { str += Math.floor(hours) + ' hour' + s(hours) + ' '; } if (minutes >= 1) { str += Math.floor(minutes) + ' minute' + s(minutes) + ' '; } str += seconds + ' second' + s(seconds) + ' '; document.getElementById('timeOnPage').innerHTML = "You've been on this page for " + str; } function s(num) { if (num >= 2) { return 's'; } return ''; } setInterval(incremementTimeOnPage, 1000); })(); </script> <noscript>Time on page provided by <a href="http://www.top-site-list.com">Top Site List Planet</a></noscript> <span id="timeOnPage"></span>
More scripts

Do you want to expose your site to millions?
Do you want to be ranked higher in Google?
Do you want to be known as the best site in your niche?

Then look no further. Add your site in 3 simple steps. Sign up, Add your site and Start receiving votes! It only takes 10 seconds!

Sign Up to Top Site List Planet Now!

Login with one of these social networks...

Sign in with FacebookSign in with TwitterSign in with Google+Sign in with Yahoo!Sign in with LinkedIn

or create an account with your email...

Login To An Existing Account