What is Average Time On Page
Average Time on Page is the time between 2 user requests. For example user requests page 1 at 8.00am and requests page 2 at 8.05am. So the time on page for page 1 will be 4 minutes. If you have google analytics installed, you can view the average time on page for your top pages Content section of Google Analytics. This is an important measure to know how users spend time on pages. You should be trying to increase the time on page for your landing pages. Let’s see how we can simply calculate the time on page.
Calculating the Time On Page
I am going to use a simple method to calculate the time on page using jquery functions. First we should get the time on page load using jquery document.ready function. Next we can get the time on page unload using jquery window.unload function. The difference between 2 times is the time spent on this page. Following code shows you how to calculate time on page. Once page is loaded click on a link in the page and you will see the alert popping up with the time on page in seconds.
Window unload method is called when ever user tries to exit from the current page. Following list contains the situations where unload function will be called. Make sure to consider all the options in the following list when you use unload function.
Things to consider in using window unload function
Window unload method is called when ever user tries to exit from the current page. Following list contains the situations where unload function will be called. Make sure to consider all the options in the following list when you use unload function.
- Navigating to a different page using a link,button,image..etc in the current page.
- Refreshing the current page.
- Clicking back or forward button from the current page.
- Changing the URL on address bar.
- Closing the browser window or tab.
October 26th, 2011 at 10:31 pm
I ran a check on your blog (https://innovativephp.com/jquery-average-time-on-page-using-ready-and-unload/) and I see that it’s not ranked very high in the search engines. That’s too bad because I think more people should be reading your stuff.
So let me ask you this…
Are you having trouble getting traffic to your blog?
The people that do visit your blog…how many of them click on your ads or affiliate links? Not many?
You see, without a constant flow of targeted traffic to your blog, your blog will fail to gain subscribers and it won’t make you any money.
So how do you get targeted traffic? To do this, you absolutely MUST get your blog ranked on the first page of the search engines (a top 10 ranking).
So how do you do that? Simple. You find out what those top 10 websites are doing to get their rankings, and you BEAT THEM AT THEIR OWN GAME.
Sounds like that would be hard to do, right? Well, it’s not when you have a software program to do this for you.
This is the same program used by Microsoft, Disney, General Electric, Master Card, Toshiba, HP and thousands of others (myself included) who use it to get top rankings in the search engines.
Why do all these big name companies use this software program? Because it WORKS and it’s the best software program on the market.
How would you like a constant flood of new subscribers to your blog? Or bigger Adsense checks? Then you need a top 10 ranking.
Go ahead and use the program for free right now – no credit card needed and see the results for yourself! Go to http://free-blog-tips.com/seo_software/ to find out more.
Now, you can decide to ignore this message …you’ll continue struggling to get traffic to your blog and your blog will make you no money…OR you can use the software to get a top 10 ranking and watch your blog take off.
To your success,
Mike Wilson (blogging expert and creater of free-blog-tips.com)