if (rand(0,2) == 1) { show adsense } else { do nothing } PHP: Does anyone know if this way of showing ads is legal by AdSense?
How and if/when you display ads is up to you.. as long as you dont change the ad-code, this is fine..
When an ad isn't there, and gets inserted into the page again, I noticed that it might change eCPM (increase it). Probably because the ad is "retrained" all over again? And on that day when that happens, I get more earnings. This is a speculation, but who knows? it makes a 20% rev difference for that day for me. Anyone else want to try that and post results here?
This almost sounds like a dirty tactic. It appears you are messing with Adwords users and/or Googles money. I'd be very careful with this and if you need a second opinion to know for sure ask a top con on the real Adsense forums. Just saying because anything that tricks Adsense into paying more money out can often be seen as fraud. Good luck though and I hope this works out for you.
Well, duh. I don't think I have to remind anyone the title of this post asks whether it is legal or not, do I? So, does it appear that doing this is messing with AdSense? Or nobody really knows? On the other hand of the argument: It's my site, I should be able to place ads anywhere on it at any time. And it would probably be ridiculous for Google to say: You have to show ads at all times. Anyone agree/disagree?
This is perfectly legal. Its your site. You choose when to show adsense or other ads. On the other hand, I highly doubt that this increases CPM. Unless CPC is more than double of what you get when you show ads all the time, this is a futile attempt. However, if you are able to increase the earnings this way, let us all know it here.
Is the CTR also increasing when you doing this? If it somehow makes people click your ads by accident more often doing this I can see a problem with it, if there was say a navigation button in the same spot before or something. Inducing accidental clicks might get you banned after all. Or is it just the pay per click that's more than doubling?
No, the CTR is not increasing. I am probably just hallucinating, as I experiment with ad placement, and as Google continues to optimize the ads on the page -- I probably thought disabling/enabling the ads "reset" the ads in terms of content, but who really knows how their algorithms really work?
You are free to show or not show ads - it's not a violation of the AdSense TOS. The OP was speculating on how to increase earnings, it's not tricking Google in any way.
There is no guarantee that 50% of times rand(0,2) would give 1. So that's not a good way. Instead you can use SQL to check what you showed last.
I do this with one of my sites and I've never had any problems. Its a good way to limit impressions from your social traffic.
it's legal but pointless. If you use this random script to display an alternative ad ok, but display nothing? In the hope of earning more? let me laugh