i am getting data from links using analytics but not the pictures. the pictures are recognized, what can i do?
sorry, just not up on the language. i use google analytics. it give me data when visitors click on a link in my site. i can see this using site overlay. i can also see that the same statistic boxes are monitoring when people click on my pics but there is no data, they always remain at 0%. any ideas why. thanks for the reply.
Analytics can monitor how many clicks images get, but that's it. Reason being image formats can not contain the Javascript code Analytics needs to collect data. The page where people find images can include the Analytics code, and thus is able to track when someone clicks a link pointing to an image.
but its not giving data as to how many people are clicking on a picture if they decide to enlarge it, no page links. you may have said that, unless the pic is a link it cant monitor it?
How are images being displayed when they're enlarged ? Is there a link pointing to a new image like so <a href="image-large.jpg"><img src="image-thumb.jpg"/></a> Code (markup): If that's the case, you'll add the Analytics trackPageView to the link similar to this <a href="image-large.jpg" onmousedown="pageTracker._trackPageview(this.href)"><img src="image-thumb.jpg"/></a> Code (markup): If you've got an existing javascript method attached to images similar to this <img src="thumb.jpg" onclick="window.open('full.php?img='+this.src)"/> Code (markup): Then it will be more along these lines <img src="thumb.jpg" onclick="pageTracker._trackPageview(this.src);" window.open('full.php?img='+this.src)"/> Code (markup): It depends on what you've got in place already. For all I know you could have a script that's selecting all elements of a certain CSS class and applying an onclick event handler to them, If that was the case you would just modify the function attached as the event handler.
thanks, its the top one. tried your code but error. i understand thats not your fault. used googles tracking code. i will need to have a look which one. thanks for your help. newby hope you understand