Hacker News new | ask | show | jobs
by fatih-erikli 968 days ago
This is known as "pixel tracker" for decades.
2 comments

Used in emails as well. Loading a 1x1 transparent <img> is a more sure thing than triggering a hover event, but ad-blockers often block those
Occasionally I've seen people fail and add the pixel as an attachment instead.
True, though doing it in CSS does have a couple of interesting aspects, using :hover would filter out bots that didn't use a full-on webdriver (most bots, that is). I would think that using an @import with 'supports' for an empty-ish .css file would be better in some ways (since adblockers are awfully good at spotting 1px transparent tracking pixels, but less likely to block .css files to avoid breaking layouts), but that wouldn't have the clever :hover benefits.