Have you ever thought about why web analytics software opts to use a 1x1 gif element to send a beacon instead of just including a
<script src='http://my.analytics.com/script.js?my=params'></script>
tag for sending the beacon? This would eliminate the need to return an actual 1x1 pixel gif, as an empty response could be a valid javascript file.