|Can I Be Penalized for an URL in a Hidden DIV?|
| 9:10 pm on Feb 4, 2005 (gmt 0)|
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...
| 11:22 am on Feb 5, 2005 (gmt 0)|
You could be penalized.
You might be penalized.
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.
| 11:36 am on Feb 5, 2005 (gmt 0)|
Come on, it's not a link, not even text, just an image. I wouldn't worry about it. But as Kaled said, using a clear gif is just as invisible and a widely used method too.
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.
| 2:20 pm on Feb 5, 2005 (gmt 0)|
Thanks for your replies. It is not exactly an image. it is a php page called through an image tag. It works, but I´m worried about being penalized by hiding this url in an IMG source and invisible div.
Anyway, I believe I should replace this with something more safe.
| 7:54 pm on Feb 5, 2005 (gmt 0)|
Make it a one-by-one pixel gif which is always clear, and put the gif in robots.txt so spiders don't screw up your stats (although they still will on occasion).
| 2:17 am on Feb 6, 2005 (gmt 0)|
First it isnt a link, and it is just calling a php script to get an image, its just same as placing an image in a hidden div. I do not thing there is any reason for it to be penalized. But using a 1x1 transparent gif would be better as kaled said some browser might not fetch it and as such the php script will not run for them.