Time on page tracking

Hello,
I am having trouble getting accurate time on page tracking for my application. From the documentation I understand that you have to turn on the heartBeat setting. I did this and set the frequency to 5 seconds, but this does not seem to have any effect.

As a workaround I am doing manual ping requests every 5 seconds using an interval while also making sure the browser tab is currently active. The requests are coming through fine now but I still don’t see the time on page update unless I go to another page within in the app. From my understanding the ping requests should update the time on page after every ping.

FYI I’m using react in my application. I’m not sure if this might be the problem? When sending manual ping requests, do I need to somehow link it to the current page being tracked?