是否有双击一个AJAX服务(DART)双击、AJAX、DART

2023-09-10 16:16:12 作者:把你的爱扔进海里

我试图把一些广告在我的网站,并希望加载它们在页面加载后。我们使用DoubleClick的DART(请不要告诉我使用谷歌的AdSense,我知道,但是这是一个战斗的另一天)。双击目前建议行内嵌入脚本标记像这样:

I'm trying to put some ads on my site and would like to load them after the page has loaded. We're using Doubleclick DART (please, don't tell me to use Google AdSense. I know, but that's a battle for another day). Doubleclick currently recommends embedding inline script tags like so:

<script language=Javascript1.1 src="http://ad.doubleclick.net/adj/sitename.dart/ 
zonename;abr=!webtv;kw=value;sz=widthxheight;ord=value"> 
</script>

这将返回与广告HTML中的文件撰写。

This returns a document.write with the ad html.

有谁知道的一种方式,这样只有HTML返回给请求的广告与AJAX调用,从而让我将广告在我的自由裁量权?我已经看到了这个做了移动广告,但没有发现任何的网站呢。

Does anyone know of a way to request the ads with an AJAX call so that only HTML is returned, thus allowing me to place the ads at my discretion? I've seen this done for mobile ads, but haven't found anything for websites yet.

推荐答案

我最终使用一种称为脚本解决了这个 writeCapture 。它拦截的广告的文件撰写的事件并允许您执行的HTML追加。

I eventually resolved this using a script called writeCapture. It intercepts the document.write event on ads and lets you perform the HTML append.

在网站上的文档是伟大的,你可以看到它在每日野兽的行动。

The documentation on the site is great, and you can see it in action on The Daily Beast.