The ROI Revolution Blog

Time on Page and Time on Site - How Confident Are You?

May 29, 2008

stopwatch.gif

Ah, Average Time on Page and Average Time on Site - what strange metrics. They sound so simple, but as I hope to point out in this article, both must be treated with caution. Due to the way Time on Page/Site are measured, there is a certain amount of error that goes along with them. Fortunately, there's a way to measure this error.

In the interest of getting to the point, I've provided two versions of this article. The first version is the short version. No proof, just the final answer. For those of you who demand proof (as I hope you do) - I've also provided the long version, with diagrams and Algebra and everything. Feel free to choose the version that suits you!

SHORT VERSION

Time on Page is more credible when a page has a lower Exit Rate, and Time on Site is more reliable when a source/medium/etc. has a lower Bounce Rate.

Confidence in Time on Page
Applies only to a page or group of pages

100% - Exit Rate

Example: The Exit % for my home page, /index.htm, is 30%, so confidence in Time on Page is 70%.

In other words, the Time on Page only applies to 70% of my home page views, and I know absolutely nothing about the other 30% - other than they all resulted in exits.

True Time on Site
Applies to any source, medium, campaign, keyword, ad, or user defined value

Average Time on Site / (1 - Bounce Rate)

Example: My AdWords traffic has a Bounce Rate of 40%, and Google Analytics has my Avg. Time on Site for AdWords as 00:01:00 (1 minute)

So:

True Time on Site is 1/(1-.40) = 1/.6 = 1.67 = 1m 40s

My True Time on Site is 1m 40s, which represents 60% of my AdWords traffic.

Also, the Time on Site is unknown for 40% of my AdWords traffic.

END OF SHORT VERSION

I don't expect anyone to take my word for any of this, and I love to talk about these kinds of things, so I've provided a longer version for those that might be interested in how I came to the above conclusions.

LONG VERSION

First things first - how is Time on Page measured in Google Analytics? I've created the following diagram to try and explain it:

2-page-visit.gif

Here's what happens in the above two-page visit. The visitor comes to Page 1 and the timestamp is registered. If the visitor then goes to Page 2, another timestamp is registered. Google can then take the difference of those two timestamps and come up with a Time on Page for Page 1.

Looking at Page 2 however, there is no timestamp for the next page, so Google Analytics is not able to calculate a time on page for Page 2.

What does this mean?

It means that if the page is an exit page for a specific visit, Time on Page is not calculated.

This makes sense, but it also means that you only have time data for (1 - Exit Rate) percent of pageviews.

So if the Exit Rate for a page is 40%, then the Time on Page metric only applies to 60% of pageviews.

Conclusion: The lower a page's Exit Rate, the more confident you can be in the Time on Page metric for that page.

How about Time on Site?

Time on Site is a little different, because instead of pageviews, it relies on visits. Since every single visit has an exit, you can't use Exit Rate when looking at your confidence level.

Time on Site is calculated by taking the timestamp of the final page of the visit (the Exit Page), and subtracting the timestamp of the first page.

So if I enter the site at 2pm and I start to view my last page at 2:10pm, Google Analytics will record my Time on Site as 10 minutes. Keep in mind that this time ignores the amount of time spent on the last page of my visit.

Which brings us to point #1:
Time on Site does not include time spent on the final page of a visit.

There is one special case which causes an additional problem. For a single-page visit (a bounce), the entrance page is also the exit page. This means that the Time on Site will be zero:


1-page-visit.gif

Which brings us to point #2:
Time on Site factors in a 0 for every bounce, even though Time on Site for bounces is unknown!

This means that confidence in Avg. Time on Site is related to Bounce Rate.

Not being the kind of person who is content with that conclusion, I brought some Algebra into the discussion. For those of you who hate Algebra, the conclusion is that

True Time on Site = Average Time on Site / (1 - Bounce Rate)

*Note that Bounce Rate here refers to the decimal value (i.e 40% = 0.40)

So for AdWords, if my Avg. Time on Site is 1m, and the Bounce Rate from Google Analytics is 40%, then

True Time on Site = 1/(1-0.4) = 1/0.6 = 1.67m = 1m 40s

Therefore, for AdWords Traffic, I know that non-bouncers spent an average of 1m 40s on the site. For the 40% of the traffic that bounced, I have absolutely no idea.

As my bounce rate gets lower, the Avg. Time on Site becomes much closer to the actual time spent on the site by all of my visitors.


Here's my entire thought process using Algebra:

In the below set of equations,


  • x is the number of visits that were bounces

  • y is the amount of time spent on the site by people who didn't bounce

  • B is the Bounce Rate

  • V is the number of Visits

  • A is the Avg. Time on Site found in Google Analytics

  • T is the Total Time on Site for all Visits



time-on-site-algebra.gif

Well, there it is. Take your Time on Page and Time on Site with a grain of salt. Time on Page is more reliable with a lower Exit Rate, and Time on Site is more reliable with a lower Bounce Rate.

Google Analytics for Online Advertisers
Here at ROI Revolution, we consider Google Analytics tracking essential for paid search, so it's included in our PPC Campaign Management service.

Comments

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM

iprogrammer said:

Thanks Shawn for your explanation. Now pls guide me that whether this formula for True Time on PageViews, is correct or not?

True Time on Page = Average Time on Page/ (1 - Exit Rate)

I am just near to the solution.
Thanks

March 2, 2009 11:52 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

No, that is not correct. Exits are not averaged in to Time on Page at all, not even as a zero. There is no such thing as 'True Time on Page'.

It's more accurate to say that the Avg. Time on Page is accurate for (100% - Exit Rate) percent of visitors and absolutely unknown for the remaining Exit Rate % of visitors.

March 2, 2009 12:02 PM

iprogrammer said:

Thanks a lot Shawn for your explanation.

Here are the statistics data for my site in GA. I tried using ur formula in this article
-------------------------------------------------------
Top Content Page View report.

7 pages were viewed a total of 52 times
Page Views 52
Unique Page Views 46
Avg. Time on Page 00:04:39 (279 secs)
Bounce Rate 75.68%
% Exit 71.15%
-------------------------------------------------------
Now in All Traffic Sources report it shows following data

All traffic sources sent 37 visits via 5 sources and mediums
Visits 37
Pages/Visit 1.41
Avg. Time on Site 00:01:53 (113 secs)
% New Visits 75.68%
Bounce Rate 75.68%

Now in this report when i do 37 * 1.41 = 52.17 which matches to total page view 52 times in TopContent Report

now according to your formuala

True time on site = 113/(1-.7568) = 113/0.2432 = 464.6382
Now total time for site is 464.6382 * 37 visits = 17191.6134

According Top content report Total time on Page = 52 pageviews * 279 secs = 14508

Total difference between both total is 17191.6134 - 14508 = 2683.6134
Please guide me above all is true?
Or where i did miscalculate?
Shouldn't this difference much less?

March 4, 2009 5:36 AM

iprogrammer said:

hi Shawn, is it possible for you to answer on my last question in which i had laid out some calculation?

Thanks in advance.

March 10, 2009 6:03 AM

larry said:

This may seem silly but in your example, how does 1.67 = 1min and 40 sec?

March 13, 2009 1:48 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@larry:

There are 60 seconds in a minute, so .67 minutes is 60 X .67 seconds, which is about 40 seconds.

March 17, 2009 10:51 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I'll try and take a look when I get the chance, but it may be a little while.

March 17, 2009 10:57 AM

Michael said:

Hello,

This artical is so wonderful. It makes me think further. However, I think time on site should be Average Time on Site / (1 - Exit Rate) * Average Pages Per Visit

What do you think?

Thanks,

Michael

May 20, 2009 8:51 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Michael:

Thanks for the compliment! Maybe I'm just not understanding your logic here, but here's what I came up with.

Every visit to the site has an exit. This means that the Exit Rate is 100%, or 1, for all visits to the site. Because Time on Site is calculated at the visit level only and not for specific pages, that makes your calculation really just Avg. Time on Site/1 * Average Pageviews Per Visit, which is just Average Time on Site * Average Pageviews Per Visit.

Which means if my site has an ATOS of 3 minutes, and my APPV is 4 pageviews, then by your calculation, I would get 12 pageview-minutes. Since Time on Site is measured in time, the pageview-minutes unit of measure doesn't really make sense here. I think that shows a bit of a flaw.

If you expand on your logic, I'd be happy to give you more feedback. Thanks!

May 21, 2009 8:27 AM

Annie Oakley, SEO said:

Excellent explanation of the problems with the time on page/site metrics!

For those looking for a very simple solution to this issue, one that doesn't require additional calculations, you can do the following:

View the time on site segmented to only Non-Bounce Visits.

In this way you remove all the skewed zero (unknown) data on the single page visits, without having to do any additional calculations.

Skeptical? The idea is suggested in Avinash Kaushik's Web Analytics, page 139.

Be well!

July 28, 2009 9:50 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Annie:

While that's certainly one good way to do it, another is to simply use our GA Report Enhancer Greasemonkey script for Firefox. This will show you the True Time on Site for visitors without you having to do any math whatsoever, while still allowing you to see all visits.

I also highly recommend Avinash's book, and even though it's a valuable resource in it's own right, it's made even better by the fact that 100% of the proceeds go to The Smile Train and Médecins Sans Frontières (Doctors Without Borders).

July 29, 2009 8:09 AM

dave said:

Wow you did some serious thinking and excellent analysis! I look at "time on site" stats but I don't really pay too much attention to it. You've got me thinking about it now. Thanks for breaking it down to the T. Great info

September 2, 2009 1:16 PM

Brewster Barclay said:

Hi Shawn,
Jonny Longden's tweet sent me here and I was wondering on a comment about multiple tabs being open. I always have multiple tabs open for sites and close them in a non-sequential order. Will every tab that I opened from another page be considered a bounce page. If so, data accuracy will be further reduced.
Many thanks,
Brewster

September 11, 2009 11:16 AM

John said:

I was onto this problem and you settled it for me.

I think this "true time on site" is helpful when evaluating whether or not to keep a keyword that has a high bounce rate.

Being analytical myself, I wish there were a place where you could find good descriptions of what this data really means without getting heavy into the html code.

October 1, 2009 7:05 PM

Steven Mann said:

Check this out - The difference between clicktale and google analytics regarding time on page accuracy.

http://blog.clicktale.com/2009/10/14/what-google-analytics-cant-tell-you-part-1/

October 21, 2009 1:06 PM

Aviva B said:

@Shawn - thanks for the great, in-depth article. Good to review high school math - on an applied level.

@Shawn or @meltir -
Could you give more info on how to give Google directions to track periodic events? On our site, we have some pages that get high numbers of visits, but extremely high bounce rates. It could be that the visitor was looking for information and found it on that page - but we have no way of knowing whether they read the page (1-3 min) or left immediately (5 sec). Would this periodic event function work for that? Are there any other suggestions for how to figure out what visitor action is on that page?
Additionally - and connected - there are some tools which enable you to give your visitor a poll/etc. when exiting your site. Could these tools be used in any way to mark an exit - and get data?

Thanks in advance for any help.

October 28, 2009 7:27 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

You can certainly use JavaScript (and other languages) to fire off a page tracker at an interval and feed it back into Google Analytics, but this can reallly junk up your data if you aren't careful. I recommend trying this kind of thing in a separate profile first.

Also, there is one tool I can think of that will give you a great idea of what users are really doing on those pages - it's called Clicktale and there is a free version available. You can even watch user activity on the actual pages to get a good view of what's actually going on.

October 28, 2009 4:46 PM

Aviva B said:

@Shawn - Thanks for the prompt reply. I would definitely use a separate profile. Not being from a programming background myself, can you recommend a resource with clear guidelines/instructions on how to implement the javascript pagetrackers?
I'm going to take a look at ClickTale as well. Thank you for the recommendation.

October 29, 2009 7:12 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Aviva B:

I would, but unfortunately there really aren't any resources for this yet. I'll see what I can do about maybe publishing something about this, but I can't guarantee that it will be too soon with all the new Google Analytics features that have been released in the last week.

October 29, 2009 8:56 AM

Aviva B said:

@Shawn -
Thanks. Looking forward to seeing what you have to say about the new Analytics features.

November 1, 2009 7:22 AM

Vladimir said:

Your metric should be called 'Estimated time on site for non-bounce visits' as 'Total time on site' is misleading.

Even as that, it is still inaccurate as it does not calculate in the time spent on the last page. To make your equation more accurate you would have to add approximation of time on page for one page (you can get this from avg. time on site and avg. pageviews/visit)

Unfortunately such estimate is still skewed as it does not take into account contribution to avg. time on site of the people who left after second pageview compared to those who had many (and thus longer time on site).

If you want to get a good approximation the correct way would be to calculate time on page for exit page for given visitor as the avg. time on that page segmented to the same visitor group (search, email, referral) which you can obtain from previous visits to the same page by visitors of the same group that didn't exit on that page.

Most accurate way available to do it is only by attaching to onbodyunload event and report true time when the user left the page in the browser.


February 3, 2010 9:59 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

I agree that the calculations in this article are still limited, but those limitations are all clearly outlined above. The calculations are not perfect, but they are better, and they are also easily calculated using the Google Analytics Report Enhancer tool. Really the main point of this article was to show the limitations of the default Time on Site and Time on Page metrics.

The calculations you suggest may help, but would still be an approximation and would be similarly flawed, since you would not be looking at Time on Page for the page when it is in an Exit Page, which is really the only thing we would need to make things more accurate.

There are many ways to force the Time on Site to be more accurate, with the onbodyunload event you suggest being one of them, but they can be difficult to manage if not implemented correctly. It all depends on how valuable a 100% accurate Time on Site is to your business. I'd say from my own experience that most sites are fine with even the default metrics,as long as they analyze trends and understand the metrics' limitations.

February 3, 2010 10:43 AM

Vladimir said:

I wouldn't say they are better, as GA shows avg. time on site which as accurate for all visitors as your metric is accurate for approximating time on site for non-bounced visitors.

Both are about equally inaccurate, the question is which one you need more.

February 4, 2010 5:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Vladimir:

It looks like we'll have to agree to disagree on that point. Again, this article is more about the overall limitations of Time on Page and Time on Site in general, and less about a new metric.

February 4, 2010 8:07 AM

Shirley said:

THANKS!
Been looking to solve the pbm of measuring time for a few days now. This surely helps.

Comments by and replies to Vladimir have also been helpful :)

Cheers!

May 11, 2011 9:00 AM

Max Manus said:

Thanks a lot Shawn

August 21, 2011 12:31 PM

Jesse DaCosta said:

Shawn this is some excellent thinking and analysis and it brings up very important points regarding Google Analytics that many don't seem to realize.

I myself have tried many times to explain these points to clients, etc., and it seems to be something most people have never realized. I find many business owners and people who are tasked with studying this data take what they see in GA as fact and don't use reasoning such as this.

Well done!

May 30, 2008 2:04 PM

Sebastien Brodeur said:

Good post.

I knew about Time on page, but I never give any thought to Time on site.

Thank!

May 30, 2008 3:13 PM

Claudiu Murariu said:

Hi,

great post but just wonder if Google isn't doing all these calculations already.

I would kind of expect them to be smart enough and apply all the algebra you talk about.

Thanks

June 2, 2008 3:24 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Jesse:

Thanks for the compliment! I also think it's important that users know what metrics actually represent. It's not that the metrics aren't useful - they are - but as with any web analytics platform, it's more important to focus on trends than accuracy. Thanks for reading!

June 2, 2008 7:46 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastien:

Thanks for the compliment, and thanks for reading!

June 2, 2008 7:47 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Claudiu:

Google isn't doing these calculations already (we've tested these metrics), although I'm sure they are aware of the limitations of Time on Site and Time on Page. Google (or rather the people there) are definitely smart, but there are still some limitations to the way that data is collected for any web analytics platform. Time on Site and Time on Page are useful, but I think it's important that users know these metrics, just like most other web metrics, aren't 100% accurate.

They instead provide useful benchmarks that you can use to measure trends in your data. This is much more important than accuracy, and can be said of just about every single metric within Google Analytics.

June 2, 2008 8:01 AM

Daniele Bianda said:

Hi, regarding "time on page" one question... do you know how we can see the difference between "new visitors" and "returning visitors". Thanks a lot

June 4, 2008 5:34 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Time on Page only makes sense when you're looking at metrics for a specific page. So you would have to first pick a page you want to measure, which you find in the Top Content report. Once you've found the page you're looking for, you can click on the page name to drill down. Once you've drilled down, you can then segment by Visitor Type to see the Time on Page for New vs. Returning Visitors.

You can, however, see Time on Site pretty easily, by using the New vs. Returning report found under the Visitors section.

Hope that helps!

June 4, 2008 8:23 AM

Daniele said:

Hi Shawn, thanks a lot for your explanation, we found this option, but the problem when you segment by "Visitor Type" is that you have the "Avg. Time on Site" and not "Avg. Time on Page" (It seems a missing option in Google Analytics). Thanks a lot

June 6, 2008 2:38 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Daniele:

Ah - I see what you mean. You can sidestep this limitation by simply creating a profile that only includes new visitors (or returning visitors). You can do this with a custom include filter, using 'Visitor Type' and either 'new' or 'returning' as the filter pattern.

This way, when you look at the content reports in one of these new profiles, the Time on Page will only apply to New or Returning Visitors, but not both. Hope that helps!

June 6, 2008 8:06 AM

Daniele said:

Thanks a lot Shawn

June 9, 2008 8:07 AM

Chris Moise said:

Great article. As a video streaming site, we have noticed a huge difference between our StatCounter numbers and our Google Analytics numbers. If someone watches a 30 minute video on our site, it can throw off the Google Analytics if they exit off that page. Anybody running a video streaming site needs to note the differences cmopared to text based sites.

June 14, 2008 5:20 PM

Andy said:

This is some interesting analysis of the metric and makes perfect sense. Very good post.

I like to combine this analysis with pages per visit, especially with sites that have a lot of pages, like large retail e-commerce sites. I think this helps give a full picture of level of engagement a user has with a web site.

June 14, 2008 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Chris:

Another good thing to keep in mind is that you can extend the timeout if you need to - which is important if you have pages that users can spend 30 minutes on. You can get the official instructions here, but basically it involves adding a single line to your Google Analytics tracking code on those pages. Thanks for reading!

June 16, 2008 8:20 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Andy:

I agree, and there are additional ways to measure user engagement. My personal favorite is by using qualitative data (surveys and usability tests) and heat maps to find out if and how users are finding what they need. Thanks for reading!

June 16, 2008 8:29 AM

Adwords Monitor said:

Interesting. I'd heard of bounce rates being measured, but it makes sense if time on site is being measured too.

As you pointed out, it's difficult to work out if no Google-based tracking (Analytics) is installed on the site, and the user doesn't return back to Google for another search.

Interesting concept!

June 17, 2008 7:50 AM

Sebastian said:

Hello,

i search for information like google analytics calculate "Time on PAGE" (from an group of pages) and read this article. Good Work. But as pointed out, this is not the way google analytics calulate it. Any Hint or Information like they do this?

September 7, 2008 1:49 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

Google Analytics calculates Time on Page as described in the first diagram in this article. I didn't do the best job naming it, but when I calculate 'Time on Site for Page 1', that's really Time on Page for Page 1. Google Analytics takes the timestamp of the first pageview and subtracts it from the timestamp of the next pageview to get time on page for the first pageview.

You can find the Time on Page metric for a group of pages by using either the Top Content report and the search field (which uses regular expressions), or by using the Content Drilldown if you are looking for a specific subdirectory.

Also, as per the article, keep in mind that this Time on Page number will only apply to (100% - Exit Rate) of pageviews. Thanks for reading!

September 8, 2008 7:41 AM

Sebastian said:

Hello,

yes they do this with these timestamps. My Problem is: I select 3 URLs in Top Content Report with regexp. And the I have the Time On Page (above the table) for this group. How is that number calulate? I can repeat that.

sum(time on page for each page)/number of pages = WRONG

time for each page/pageview for each page * (1 - Exit Rate for each Page) = WRONG

I\xB4ve try and try in any variations and can not repeat the calculation... thats the that drives my crazy...

September 8, 2008 8:15 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Sebastian:

The Total Time on Page above the table is the weighted average of the pages within the table. It's calcuated by taking the total time spent on each of the pages (Time on Page * Pageviews for each page), and then dividing that number by the total number of pageviews.

It will be off by a little due to rounding issues, but it will be very close. To give you an example:

Page 1 - 200 pageviews, 1:00m Time on Page
Page 2 - 400 pageviews, 4:00m Time on Page

Total Time on Page (above the report) = [(200*1) + (400 *4)] / 600 = (200 + 1600) / 600 = 3 minutes

Hope that helps!

September 8, 2008 8:47 AM

Sebastian said:

@ Shawn:

Yes! Thats it, tahnks!

It would be never exact cause i can only calculate "pageviews" * "arithmetic mean (value) of the Time on ONE Page".

Google can use every single timestamp difference to calc the Time on PAGE for a group of pages.

The distribution of the time on One Page would be interessting. For example it is a newsletter landing page... As pointet out i can use the the exitrate for better confidence. :)


Thanks

September 9, 2008 3:31 AM

Goran Web said:

What a great post. There are so many variables that the actual time on the site per active user is always more then that of what analytics actually says.

When I surf I open 10 tabs so does that mean that I am increasing the time on site even though I am not actually on the site but my browsers is.

Your formulas above are too advance for me. Is there a little program that we can get to calculate the actual time on site based on all these factors.

PS, why is there no were for me to request a follow up email if someone responds to my post to get me back to your blog.

September 16, 2008 2:53 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Goran Web:

Thanks for the compliment. The best tool that I recommend is Jeremy Aube's Google Analytics Report Enhancer. It's a Greasemonkey script that will show the True Time on Site right in the Site Usage report!

Our blogging system currently doesn't allow for follow-up emails - but we're always looking to improve. Thanks for the feedback and thanks for reading!

September 17, 2008 1:34 PM

Kristin said:

If looking at GA for just one page within a site, could you use the "avg time on page" number to substitute "avg time on site" for the True Time calculation? So then you would have a calculation of the true time on that page for the non-bouncers?

February 10, 2009 6:09 PM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@Kristin:

Unfortunately, that wouldn't work. The reason is that bounces (and all exits in fact) do not affect the Time on Page metric at all. The Avg. Time on Page Metric already excludes all exits from the page, and therefore is already a kind of 'True time on Page' for 100%-Exit Rate percentage of visitors.

Unfortunately, there is no good way to look at the time on page only for non-bouncers. True Time on Site really only applies to visits and not single pages.

February 11, 2009 7:58 AM

meltir said:

thanks for this, it explains why I got so many 0:00 time averages on my single page site.

February 11, 2009 11:37 AM

meltir said:

Shawn, a quick question:
google's javascript libs allow one to send out a custom message to google, to account for any ajax interactions and such:
pageTracker._trackPageview('foo');

would adding a periodic event like this (say every 10 sec) increase the accurancy of the time on site averages (for single page sites with very high bounce rate)?

i've noticed by accident that it _seems_ to help, and see no reason why it wouldn't.

(apart from screwing with the pageviews, which is something i handle via filters anyway)

February 11, 2009 11:56 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@meltir:

This is actually a very good way to get a better estimate of how much time someone is spending on an individual page. I would recommend doing this in a separate profile though, or else you'll end up with inflated pageview numbers.

February 11, 2009 5:20 PM

iprogrammer said:

Hi Shawn, great article but have a question for you. In GA, is it required that Total time on all page views from Top Content Page View report, should match equal to the Total on site from All Traffic Sources report?

If NO then can you please explain the reason for same?

If YES then from where in GA, I can match those 2 total time on page & site & how?

March 2, 2009 8:35 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

I doubt very much that those two metrics would match. First of all, there is no 'Total Time' for all page views, only an Average Time on Page, which is pretty different, because it means that there is rounding. Even if you multiplied the Average Time on Page by the number of pageviews and then summed all of the pages together, the rounding would cause this number to be different than the Total Time on Site metric derived from the All Traffic Sources Report.

I guess I can't really see why you would need to do this. The Avg. Time on Page is for pageviews, and the Avg. Time on Site is used for visits. Really the only way to compare the two would be to export the two reports into a spreadsheet, and calculate the totals for each one. Still, due to rounding (especially on the content reports) the numbers will most likely be different.

March 2, 2009 9:05 AM

iprogrammer said:

Thanks Shawn for your reply. I have a requirement of solving this puzzle from my client who raised this question & he asked me that why it doesn't match. So i googled & found your article & felt much interesting. As per example under LONG VERSION in this article, it gives total time for pageviews & site equal for particular visit. So by this theory no matter how many number of visits come to the site, both totals should match, shouldn't they? And thats what my client is asking to me.

Also i understood your point of rounding but other than this, is there anything else which makes these total time numbers eventually not equal?

March 2, 2009 9:48 AM

Shawn Purtell, Senior Web Analytics Engineer Author Profile Page said:

@iprogrammer:

The biggest difference is that Avg. Time on Page does not include views of the page that were exits (the last page in a visit - it just ignores them), whereas the Avg. Time on Site factors in a zero for these types of pageviews during a visit. This is most apparent when looking at bounces. Bounces are not calculated as part of the Avg. Time on Page at all, whereas for Avg. Time on Site, bounces would be calculated as zero seconds for the visit.

If you used the True Time on Site metric from this article, which is part of our Report Enhancer script, the numbers should be much closer, although some rounding will still be involved.

March 2, 2009 10:26 AM