Using Adsense and popups on the same page using php!
I have Adsense on my site. I also want popunders on my site to increase revenue but it is against Adsense's TOS.
I would be displaying only 1 popunder per visitor for a 12 hour period.
So I was wondering if I could produce a script in php so that when a visitor first visits a page on my site there is no Adsense ads on the page and it produces the popunder. Once he revisits the page or goes to another page he will never see a popunder again but he will now see adsense ads instead.
Is there a way of doing this or is there a free script that can control your ads so that I can make the popunder code display in my website only once per visitor and then the next page the visitor goes to they will only see adsense ads an no popunders will appear untill he comes back to my site 12 hours later.
Set a cookie that lasts for 12 hours. When a user visits your site, check to see if the cookie is still there. If so, show adsense. If it's not, show the popunder.
You'll miss users who do not allow cookies, but I don't know of any way at all to keep track of that without using a DB or txt file. You could track IP's but many internet users are assigned different IP's when they log on.
Setting a cookie just seems to be the simplest method to me.
Doing this shouldn't really break Adsense TOS should it because if Adsense robots check to see if I am using popups or popunders then they will only see the popunder code and there will be no adsense code on the page, but if they see adsense code then they will not see any popunder or popup code will they.
Does anybody know what percentage of computers accrossed the world delete or not store their cookies.
This is because if they don't allow cookies on their computer then I my site will just be having the popunder code in them and will not show any adsense ads at all and could then loose me some good money.
I would prefer it the other way around.
If there do not accept cookies then it will just display my Adsense code and not the popunder code.
I'm not too familiar with Google's TOS regarding AdSense. You may want to post that in the Advertising forum. I do know that you ARE allowed, for example, to put AdSense on one page, and then, Yahoo, for instance, on another. If you did your PHP code right, the bot wouldn't even know. But how would Google react if someone reported your site?
I tried to do a quick search on cookie statistics but found nothing useful. I would tend to think if anything people have cookies enabled...they just restrict certain sites (or allow) from installing them. Depending on what your site is dealing with, they may not want you to put cookies on their site. It's just one of those deals where you enjoy being a programmer...there's never a simple solution...
It's probably best if I ask Adsense about doing this then to see if it breaks their TOS or not as I don't want to break their TOS.
I can't see how it is though as I will not be having a popunder on the same page as adsense. When a popunder happens there will be no Adsense on the page, when there is Adsense on the page then a popunder will not be spawned or you will not even see any popunder code within my source code.
I wouldn't ask Google. They might tell you it's not allowed (even if it is). Ask others who do similar if they've had problems. I always believe you get the best information from the customers, not the company!