Q:

Google analytics tracking on main html, rest is ajax. Do active visitor status is lost without javascript refresh?

I have put Google Analytics tracking script into a main.html page. Main page is then never reloaded but content is updated once in a while using recurring ajax background call. I don't need to track recurring ajax calls.
<body>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-XXXXX-X', 'auto');
  ga('send', 'pageview');
</script>
...
</body>

Client stays there for five hours, ajax is called periodically but main page is never reloaded so an embedded ga scriptlet is not run again. Do GA statistics still count this an active session, it's dropped once tab or browser is closed?
Should I once every XX minutes call GAAPI method on a main page to refresh status on ga backend server keeping an active visitor status alive?
   ga('send', 'pageview');

A:

A session last for 30 minutes, by default; however, you can adjust the length of the session from 1 minute to 4 hrs.
Take a look at the Google's documentation for How a session is defined in Analytics.

