Why does Google Analytic request a GIF file?

google-analytics

Solution

Even with JavaScript enabled, analytics requests a GIF file. If you look at the GET params of the image, it contains a lot of information about the browser. Stuff like `utmsr=1280x1024` (the screen size). Google Code has a list of parameters.

It uses the image request to send information about the browser without an `XMLHttpRequest`.

Now, to actually answer the original question, Google is probably doing this to get around cross-domain `XMLHttpRequest` restrictions.

Problem

Why does Google Analytic request a GIF file? Is it because the GIF allows access to more data than JavaScript alone. Is it to get the IP address of the user?

Original source