Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
331 views
in Technique[技术] by (71.8m points)

javascript - How to force advert to show on ajax-loaded page? (Adsense)

How can I force an advertisement to show on an ajax-loaded page? Because, as you may know, document.write(); used by AdSense is skipped in asynchronous requests.

I NEED to force that ad to be shown. I also searched on google help forum but with no luck. I found only this but that doesn't tell me anything (it's discontinued).

Note: I also found this topic but I'm not about to refresh these adverts, JUST to show them ! Tried if ($('#advert')){ eval($('#advert')); } before, does not work

Is that possible? Is there some workaround?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Sorry, but I think that way of showing AdSense violates Google's TOS. So even if you manage to do that, expect your account to be suspended some time later.

Edit:

Reference: it is already in the other answers https://www.google.com/adsense/localized-terms

Moreover, some time ago I tried to use ajax loaded page to show adsense and indeed they stopped the account. I also tried Iframe and again the account was suspended. Google don't give a *** until you start gaining $$$. So each time it took a while to suspend them. But thrust me they check each site manually at regular basis. So everytime I had to write many letters to google support to restore my accounts and it took a month to restore it and not before I fix the ads. I hate to be dark prophet, but I am pretty sure you will end like me if you mess with google's TOS. My personal advise is to revise your strategy.

I actually may go further and tell you that adsense payment is not very strict, and when something is wrong it is never in your favor. Many colleagues complain about the same, like uncounted clicks, unprovoked account suspensions (usually with significant money to check out), I also have one account that was never able to verify the address, because they don't send me the postcard and I made several requests and waited 2 months each time (for postal delays) and of course I have $$$'s to check out. So mate, don't try to cheat google, because more likely they will cheat you.

This is only my personal view and may contain some strong words that I'm not going to prove, because I'm not trying to start a discussion or accuse anyone.

Edit 2: I also can tell you why google do not allow asynchronous display of ads. Because you can manipulate the context (e.g. put hidden texts) and display non-relevant ads to your page, you can make google show only expensive ads which usually pay $1 per click (well google takes $4+ to the advertiser) and your context may only show $0.05 ads. Other way you could cheat is to simulate clicks or force the user click on ads.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...