添加“广告”有哪些潜在风险?使用 JavaScript 跟踪图像?
我的任务是添加一些“Doubleclick Spotlight" 标记到我们网站上的多个页面,以帮助收集即将推出的广告系列的数据。
我们的网站每月约有 100 万独立访问者,因此我在将其他人的代码添加到我们的存储库时始终保持谨慎。
代码如下所示(旨在放置在我们的 body 标签内)。
<script type="text/javascript">
var axel = Math.random() + "";
var a = axel * 10000000000000;
document.write('<img src="http://ad.doubleclick.net/activity;src=99999;type=foo315;cat=bar561;ord=' + a + '?" width="1" height="1" alt=""/>');
</script>
<noscript>
<img src="http://ad.doubleclick.net/activity;src=99999;type=foo315;cat=bar561;ord=1?" width="1" height="1" alt="">
</noscript>
我的问题是:这会带来风险吗?它会阻止页面加载或产生其他不利影响吗?我想不出任何明显的东西,但很喜欢你的见解、经验或想法。
谢谢
I've been tasked to add some "Doubleclick Spotlight" tags to a number of pages on our site to aid in gathering data for an upcoming campaign.
Our site gets about 1 million unique visitors a month, so I'm always cautious about adding someone else's code to our repository.
Here's what the code looks like (and is intended to be placed inside our body tags).
<script type="text/javascript">
var axel = Math.random() + "";
var a = axel * 10000000000000;
document.write('<img src="http://ad.doubleclick.net/activity;src=99999;type=foo315;cat=bar561;ord=' + a + '?" width="1" height="1" alt=""/>');
</script>
<noscript>
<img src="http://ad.doubleclick.net/activity;src=99999;type=foo315;cat=bar561;ord=1?" width="1" height="1" alt="">
</noscript>
My question is this: Does this introduce risk? Could it block page loading or have some other adverse effect? I can't think of anything obvious but would love your insights, experiences, or thoughts.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,
document.write()
会阻止进一步的页面加载。Yes,
document.write()
blocks further page load.