To recap your question:
You're looking to monitor where a user is on a page and if the user is on a specific place on the page for more than 10 seconds you want to make an ajax call to store some data regarding that post/spot on the page?
I think a combination of the HTML Intersection Observer API and a setTimeout would work for this.
HTML Intersection Observer API details can be found here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
However this is an new/upcoming feature in browsers so the support isn't great. There does seem to be a polyfill though: https://github.com/w3c/IntersectionObserver/tree/master/polyfill