By Amit Kursija Dec 07, 2010 0

Tracking Code: Changing session timeout

Our tracking code currently uses the universally known timeout value of 30 minutes, meaning, we will consider the session active until after 30 minutes of inactivity. If an action such as page view, custom event, etc. has not be fired by the current user for 30 minutes we will automatically kill that session and assign the next action that the user takes in a new session.

That’s all nice and greedy if every website session is 30 minutes which by the way until now I haven’t seen any proof that indicates so and to calm me down, I’ve added a nifty feature that will allow you to override the default timeout value for those of you that would like to.

So if you want to set a custom session timeout for 10 minutes, here is how you will do it. Note: Timeout value is in milliseconds and not seconds or minutes.

<script type="text/javascript">
    fxm.setSessionTimeout(600000); // 10 minutes
    fxm.setHost('foxmetrics.com');
    fxm.Log();
</script>

Ready to get started?

Get started in minutes.

Get Started