如何强制广告在ajax加载的页面上显示? (站长)
如何强制在 ajax 加载的页面上显示广告? 因为您可能知道,AdSense 使用的 document.write();
在异步请求中会被跳过。
我需要强制显示该广告。我也在谷歌帮助论坛上搜索过,但没有成功。我只找到了这个,但这并没有告诉我任何信息(它已停产) )。
注意:我还找到了此主题,但是我不打算刷新这些广告,只是为了展示它们! 尝试过 if ($('#advert')){ eval($('#advert')); } 之前,不起作用
这可能吗?有一些解决方法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
抱歉,但我认为这种显示 AdSense 的方式违反了 Google 的服务条款。因此,即使您设法做到了这一点,您的帐户也会在一段时间后被暂停。
编辑:
参考:它已经在其他答案中 https://www.google.com/adsense/ localized-terms
此外,前段时间我尝试使用ajax加载页面来显示adsense,确实他们停止了帐户。我也尝试了 Iframe,但帐户再次被暂停。在你开始获得$$$之前,谷歌不会给予***。所以每次都需要一段时间才能暂停它们。但我催促他们定期手动检查每个站点。
因此,每次我都必须写很多封信给谷歌支持来恢复我的帐户,并且花了一个月的时间才恢复它,而不是在我修复广告之前。我讨厌成为黑暗预言家,但我很确定如果你搞乱了谷歌的服务条款,你会像我一样下场。
我个人的建议是修改你的策略。
我其实可以更进一步告诉你,adsense付款不是很严格,一旦出现问题,永远不会对你有利。许多同事也抱怨同样的事情,比如不计其数的点击量、无端的帐户暂停(通常需要大量资金才能结账),我也有一个帐户永远无法验证地址,因为他们不向我发送明信片,而我却做了多次请求,每次都等了两个月(因为邮政延误),当然我还有$$$要退房。所以朋友,不要试图欺骗谷歌,因为他们更有可能欺骗你。
这只是我个人的观点,可能包含一些我不会证明的强烈言论,因为我不想引发讨论或指责任何人。
编辑2:
我还可以告诉你为什么谷歌不允许异步显示广告。因为您可以操纵上下文(例如放置隐藏文本)并向您的页面显示不相关的广告,所以您可以让谷歌仅显示昂贵的广告,这些广告通常每次点击支付 1 美元(谷歌向广告商收取 4 美元以上),并且您的上下文可能仅显示 0.05 美元的广告。您可以作弊的其他方法是模拟点击或强制用户点击广告。
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.
似乎他们现在已经停止了 google adsense for ajax 服务。但是,Google 服务条款不允许使用 JavaScript 加载广告,并且可能会导致您被禁止。
https://www.google.com/adsense/localized-terms
Seems like they've stopped google adsense for ajax service now. However, loading ads with javascript is not allowed in google terms of service and may get you banned.
https://www.google.com/adsense/localized-terms
在隐藏的 iframe 中加载包含广告的页面,并在加载时获取其内容。
我不确定它是否适用于 Google 广告脚本,但它似乎一般适用于 javascript。
Load the page with the ads in a hidden iframe, and just get the contents of that when it's loaded.
I'm not sure it works with Google ad scripts specifically, but it seems to work with javascript in general.