- timeonsitetracker.js tracks time spent on page by user session.
- It exposes getTimeOnPage() API which gives back time spent so far on page. Call it any time to get current page's time on page(TOP)
- Unprecedented accuracy (user's browser tab presence only) and detailed time on site information
- Provides support for blacklisting URL from tracking time on site(TOS)
- Measure your user's interaction with site directly and accurately.
- Most Reliable and stable APIs to measure time on site metric consistently
- Multi-tab browser session accuracy and pageview capture
- Modern browsers result in most accuracy compared with older browsers when using timeonsitetracker.js
- timeonsitetracker.js is commercial software with restricted free use options
https://saleemkce.github.io/timeonsite
{
TOSId: 1129620185532,
TOSSessionKey: "14802525481391382263",
TOSUserId: "anonymous",
title: "Blog application - Nature & Wildlife",
URL: "http://tos-localdata.chennai/home.php"
entryTime: "2012-11-27 13:15:48.663",
exitTime: "2012-11-27 13:17:31.663",
timeOnPage: 103,
timeOnSite: 103,
timeOnPageTrackedBy: "second",
timeOnPageByDuration: "0d 00h 01m 43s",
timeOnSiteByDuration: "0d 00h 01m 43s",
trackingType: "tos",
}
<script type="text/javascript">
var Tos;
(function(d, s, id, file) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.onload = function() {
var config = {
trackBy: 'seconds',
developerMode: true
};
if(TimeOnSiteTracker) {
Tos = new TimeOnSiteTracker(config);
}
};
js.src = file;fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'TimeOnSiteTracker', '//cdn.jsdelivr.net/gh/saleemkce/timeonsite@1.2.1/timeonsitetracker.min.js'));
</script>
- Place it just after starting <head> tag in your web app https://cdn.jsdelivr.net/gh/saleemkce/timeonsite@1.2.1/timeonsitetracker.min.js or from CDNjs https://cdnjs.cloudflare.com/ajax/libs/timeonsite/1.2.1/timeonsitetracker.min.js
Documentation & Integration Steps
https://github.com/saleemkce/visual
Advanced querying of timeonsite & page visit duration metrics with SQL
- Modern web and mobile browsers supported well; old browsers supported with less accuracy.
https://saleemkce.github.io/timeonsite/docs/releases.html
https://cdnjs.cloudflare.com/ajax/libs/timeonsite/1.2.1/timeonsitetracker.min.js Version 1.2.1 (latest)
https://github.com/saleemkce/timeonsite/tags (Older versions - just a legacy support, not recommended; you may upgrade today as is since we promised non-changing APIs)
Project inspired by the impacts of web's PHP & JQuery!