Welcome to WebmasterWorld Guest from 184.108.40.206
I'm creating a custom stats script for my sites. It involves placing a php script on each page that I want to track.
The programmer placed the php script into a hidden div like this:
Can I be penalized by Google for using this kind of technique?
I'm not asking how to solve it, but if it is legal or not.
I find it technique placed on a gray zone, but I'm not sure...
I argued long ago that any text that is hidden should simply be ignored, but my comments seemed to fall on deaf ears at Google.
In this case, it's a graphic that's hidden, but I wouldn't recommend assuming it'll be ok.
Use a wholly-transparent .gif image - that should be ok.
Also, using display:none might, on some browsers, cause the image to never be fetched and therefore page-hits could go uncounted.
I'm worrying more about Hn text that's replaced by a background image using css and the text being moved a mile or so off to the left of the visible screen area.
I want to do it, but never dared to.