Imagine that you want your web page to send a message "gphil clicked this link X" back to the server, but you're only allowed to request information, not gather it. The work-around that we use in web analytics, is that we request an image named "link-clicked.gif?dude=gphil&link=X." The query parameters are built dynamically with JavaScript and the image request is added as an on-click call on the link. The server is configured to accept this request and parse and log the data from the query parameters, and meanwhile returns a .gif image consisting of a single transparent pixel. This script apparently doesn't even render the pixel, it just stores it somewhere.
Advanced techniques include noscript fallbacks and adding a timestamp to prevent client or server caching from messing with your data collections.