简体   繁体   English

这个谷歌的adsense代码究竟做了什么?

[英]What is this google adsense code doing exactly?

Hey, I am trying to further my knowledge of javascript and was wondering if anyone could explain to me what exactly is happening in the script below: 嘿,我正在努力进一步了解javascript,并想知道是否有人可以向我解释下面脚本中究竟发生了什么:

<– Begin Google Adsense code –>
<script type=”text/javascript”>
google_ad_client = “ad-client-code-goes-here”;
google_ad_slot = “ad-slot-code-goes-here”;
google_ad_width = 300;
google_ad_height = 250;
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
<– End Google Adsense code –>

Most importantly, why are there 4 'google_ ad_ ...' at the beginning and what is the purpose of them? 最重要的是,为什么一开始就有4个'google_ ad_ ...',它们的目的是什么?

A line by line explanation would be awesome :) 一行一行的解释会很棒:)

Thanks for any help. 谢谢你的帮助。 I really appreciate it. 对此,我真的非常感激。

The google_ad... are variables (associate this code to your account, set width/height of ad, etc). google_ad ...是变量(将此代码与您的帐户相关联,设置广告的宽度/高度等)。 They're being set for the script (show_ads.js) that will later be loaded. 它们被设置为稍后将加载的脚本(show_ads.js)。

For a full rundown of the variables, see CyberNAC Javascript Variables used in Adsense . 有关变量的完整纲要,请参阅Adsense中使用的Cyber​​NAC Javascript变量

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

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