我的广告系统提供商收到了有关点击欺诈的警告.没有进一步的信息,他们所推荐的是"为太快点击广告的用户隐藏广告".我写了一段JS脚本,点击时隐藏所有DIV广告N秒(使用cookie),但这个解决方案不起作用,因为"内部"内容(带广告)是由调用和呈现的JS脚本生成的来自外部服务器的内容(正如您对广告系统的期望).因此,当考虑到跨域安全性时,它有点像Catch 22.我如何检测DIV(本地定义)内部由外部JS和iframe呈现的内容中的单击?
例:
<div class="ad-class"> <!-- locally defined div -->
<div id="my-id"> </div> <!-- identifies my ad in the provider's system -->
<script>
var foo = blah // declares the ad dimensions and stuff
// and renders the contextual ad in #my-id DIV
</script>
</div>
Run Code Online (Sandbox Code Playgroud)
如果它都是本地的,解决方案将很容易,因为内部div将继承父类("ad-class").如果是跨域,则无效.有什么提示,老兄?