简体   繁体   English

如何检测第三方广告服务器的请求

[英]How to detect 3rd party adserver requests

I run video ads on my site. 我在自己的网站上投放视频广告。 I've been trying to detect ad clicks on my video ads. 我一直在尝试检测视频广告上的广告点击。 I would like help detecting clicks on the videos/ rich media ads (3rd party) 我希望帮助检测视频/富媒体广告(第三方)上的点击

So the video ads are flash videos. 因此,视频广告是Flash视频。 Here is an example. 这是一个例子。

<script type="text/javascript">
var vaunit_unit_type=0;
var vaunit_width=300;
var vaunit_height=250;
var vaunit_id=4320;
</script>
<script type="text/javascript" src="http://syndication1.viraladnetwork.net/getad/"> </script>

I would really appreciate any help at all. 我真的很感谢任何帮助。 Even if it's a link or a search keywork 即使是链接或搜索键

The Flash video isn't part of the browser; Flash视频不属于浏览器; the browser mainly leaves space empty on the page and then tells Flash the boundaries of the empty area. 浏览器主要将页面上的空白留空,然后告诉Flash空白区域的边界。 When the video is rendered, Flash will create a new window in that empty area which is why the browser can't detect any mouse events inside of that window as soon as it gets the focus (ie when you click inside of it). 渲染视频后,Flash会在该空白区域中创建一个新窗口,这就是为什么浏览器一旦获得焦点(即在其中单击时)便无法在该窗口内检测到任何鼠标事件。

This is why you can't put an element in front of a Flash video (like an invisible div ): The Flash window is on top of the browser window; 这就是为什么您不能在Flash视频(如不可见的div )之前放置元素的原因:Flash窗口位于浏览器窗口的顶部; the browser can always only render "below" it. 浏览器始终只能在其“下方”呈现。

So to do what you want, you will need the source code of the Flash video player. 因此,要做您想做的事情,您将需要Flash视频播放器的源代码。 That will allow you to add mouse listeners and detect mouse clicks. 这样您就可以添加鼠标侦听器并检测鼠标单击。

var clickcount=0;

$( 'div #videospace a' ).click(function() {

clickcount=clickcount+1;

    });

Add this in another script tag its a solution of your problem you will get click count from clickcount var as if you diagnose your add iframe having clicable link which shows the add with popup is under din with id="videospace" 将其添加到另一个脚本标签中即可解决您的问题,您将从clickcount var中获得点击计数,就好像您诊断出添加的iframe具有可疑的链接一样,该链接显示弹出框的添加项在id为“ =“ videospace”的din下

if you want click on advertiser and publisher are also counts then add one more function with it 如果您还想点击广告客户和发布商,则可以添加一个功能

  $( 'div #directlinksa' ).click(function() {

    clickcount=clickcount+1;

        }); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM