googleanalytics / autotrack

Automatic and enhanced Google Analytics tracking for common user interactions on the web.
Other
4.93k stars 563 forks source link

Regular extreme values included in report #197

Closed rubencart closed 7 years ago

rubencart commented 7 years ago

We use the pageVisibilityTracker to get a more realistic view of the time users are effectively interacting with our pages (instead of the built-in time on page metric).

However we noticed that, way too regularly, extreme values for visible page time are included in the reports. E.g. for a 5 day time period, we have multiple pages with an average visible time of over 5 hours:

list

For one particular page (as an example), the graph looks like this:

graph

Meaning that usually the average visible time of the page is more or less 2 minutes, but something unusual causes it to be almost 8 hours one day.

These extreme values double our averages, making the data difficult to use. Is this behavior to be expected? Are we doing something wrong?

Could be a bug: maybe the method that ends your times is not called sometimes? Or did someone really leave the page opened that long? In that case it would be a large improvement to your plugin if you'd filter these results out. After all people use this plugin to get a MORE realistic view of the time people interact with pages :-).

philipwalton commented 7 years ago

What version of autotrack are you using? There was a bug (#177) that was fixed in May where in some cases extra long page visible times were being reported, so if you're using a version between 2.1.0 and 2.3.3, that might be the reason.

Since that bug fix, I've added code to ensure that no page visibility data is sent unless the plugin is sure the session hasn't expired, so this sort of things shouldn't ever happen (if anything, it'd error on the side of not reporting in ambiguous cases). If you're using a newer version and still seeing this, I'd be willing to help you troubleshoot since, I agree, that would make this plugin useless.

In that case it would be a large improvement to your plugin if you'd filter these results out. After all people use this plugin to get a MORE realistic view of the time people interact with pages :-).

One way you can get around this currently is to create a segment that excludes sessions with a page visibility event value greater than some threshold (perhaps 60 minutes or so).

This is also a good way to try to debug the issue. You can create a segment that includes only sessions with extra long page visibility event values to get a sense for whether those values are reasonable or not.

And if you're curious how to drill down into individual user actions like this, I wrote a post on how I do this earlier this year: https://philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build/

rmertens commented 7 years ago

That was it indeed. Thanks for your super helpful response Philip!

(i work together with @rubencart so taking over since he's out today)

rubencart commented 7 years ago

I am sorry I did not check that first :-). Thanks for you help.