Does Google Analytics count the visit if someone references an image from my site?

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts I will will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

My question was:


Well, the question is in the title. I searched SO (obviously) but nothing similar came up. Additional reading material (if you happen to know one) will be helpful to solve this mystery for me.

The answer, by user Eike Pierstorff, was:

No, not by default at least.

It is technically possible to contrive a serverside solution that measures referenced assets. But usually (i.e. when you use the javascript tracking code) Google Analytics will only measure documents that have the tracking code embedded. Since you cannot embed javascript code in image files they will not be tracked.

If you want to see which images have been called from other domains you can instead have a look in your webservers access logs which keeps track of all requests to your server and usually includes the address of the referring site.

Written by Nikola Brežnjak