Hacker News new | past | comments | ask | show | jobs | submit login
Tracking Scroll Depth with jQuery and Google Analytics (ravelrumba.com)
43 points by robflaherty on Apr 15, 2012 | hide | past | favorite | 13 comments

Tracking scroll depth is interesting, but percentage isn't all that helpful. The number of comments on a blog post will mess with the data, for example (you won't be able to reliably compare Post A to Post B).

What might make more sense is tracking who scrolled down to the end of the .blog-post div, to the end of the .comments div, and to the end of the footer. Or whatever makes sense for the content on your page(s).

All engagement metrics are pretty loose. Scroll depth percentage doesn't tell the whole story but to the degree that scroll tracking is useful, I think percentage provides a simple, document-independent metric.

Btw, tracking scroll points for specific DOM elements is one of the plugin options, so for instance you could track the end of the .comments div as you mentioned.

Yes there are more exciting options. take a look at pagealizer reports http://www.pagealizer.com/?page=report&type=demo and alenty reports http://www.alenty.com/en/demo/display-ads

nice work. this has become a popular topic in GA circles with single page sites becoming popular and single page visitors increasingly entering directly on to a blog post and leaving and GA showing them as a bounced visitor.

Some other solutions I like http://www.savio.no/blogg/a/114/tracking-content-scrollers-s...


Or you can track Scroll Depth without jQuery. https://github.com/CardinalPath/gas

The number of responses here talking about how cool this is disturbs me.

Yet another reason to use ScriptNo (Chrome).

I think only one person said it was cool :) What is disturbing about it? Do you feel it's a privacy violation?

Very cool. Makes me wonder, what other valuable visitor metrics am I missing out on?

What can be done about Noscript users in that regard? Image bugs?

you could try using server side GA. which try to mimic the js script using php. this is the most fleshed out version I know http://code.google.com/p/php-ga/

For statistical purposes all the people with JS enabled should be enough; but just for the sake of the technical challenge: 1) Link position, if they clicked a link under the first 1000 pixels of the page they probably scrolled. 2) Something similar but more complex can be done with images on CSS hover effects (using the webserver access logs) BTW, using something similar to this together with the "media" attribute on LINK tags allows you to see witch CSS file they are using, and therefore screen resolution.

How does this work with pages with infinite scroll?

I haven't tested it with infinite scroll but essentially it'll be a race. If the user can scroll to the bottom of the page before infinite scroll is able to load new content, the 100% event will fire. Otherwise it'll just register the previous scroll event (75% or a specified DOM element).

Applications are open for YC Winter 2021

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact