How to track user activity on a webpage with Javascript?
<p>i want to track the user activity on page. 
on webpage there are various chapters in single video.
i want to keep track on when user started watching a chapter and when ended it.
and when user selected other chapter.</p>

<p>i am confused how to start tracking.</p>