3 ms·
The analytics should only be triggered is the page is rendered, assuming it's done client side. I believe Google does this for first top 3 results if I'm not mi
by mariopt 8y ago
The analytics should only be triggered is the page is rendered, assuming it's done client side. I believe Google does this for first top 3 results if I'm not mistaken.
- michaelbuckbee 8y agoThis helped me quite a bit, my mental model of how this worked was off. Prefetching only downloads the resources but does not actually execute any js code. So sites doing lots of tag managers or other js loading js likely wouldn't benefit, but standard GA, etc. should be fine.
- hombre_fatal 8y agoGood point. What would be a good way to avoid prefetch requests in your analytics if you only derive analytics from server access logs?
- 8bitben 8y agoMost browsers pass a "purpose:prefetch" or similar HTTP header in the prefetch request that you can use to differentiate
- hueving 8y agoThen how do you know when they actually go to the page? Do you need client side analytics at that point since the browser already has the page in memory?
- Drakim 8y agoYou could obviously do it with JavaScript by pinging the server to tell him that log entry X is to be promoted to a true "hit". For a non-JS solution, I guess an tiny iframe at the bottom of the html page that accesses a special server page with an unique stamp that causes the same "hit". the iframe loading would mean that the rest of the page is mostly loaded before it was closed.
- dspillett 8y agoAdded bonus: these extra pre-loads on hover will tell you if someone nearly clicked a link. Your web server logs contain some poor-man's eye tracking. Could aid determining if important parts of your pages (warning messages and so forth) gather enough attention.
- sleavey 8y agoSeems like an invasion of privacy. I'd be surprised if someone hadn't used this sort of script for this already. Perhaps browsers or ad blockers will block this feature in the future.
- ohmatt 8y agoThere's already other libraries out there like Fullstory, which tracks all the user mouse movements and interactions with the page and allows you to watch a user interact with your site in nearly realtime.
- dspillett 8y agoThere are full tracking tools that do a lot more than this already - tracking all mouse movements and key presses. They are often used with the knowledge of users when testing UI changes/experiments, I've even heard of more general versions running as a browser plug-in for medical monitoring (watching for changes in coordination of people with degenerative conditions, without it feeling like an active test accidentally biasing results), though I would also be surprised not to find the idea already used more widely (and perhaps more nefariously) without users knowing.