Google AdSense 網頁級廣告的代碼添加方法
為網頁級廣告生成廣告代碼後,您需要將此代碼放置在要展示廣告的每個網頁中。您應將廣告代碼放置在網頁的 <head> 標記(或正文頂部)中。
下面的示例顯示了代碼的放置位置:
添加網頁級廣告代碼之前的 HTML 網頁示例
<html>
<head>
這是您網頁的標頭部分。
<title>示例 HTML 網頁</title>
</head>
<body>
這是您網頁的正文部分。
</body>
</html>
在 <head> 標記中添加了網頁級廣告代碼的 HTML 網頁示例
<html>
<head>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-123456789",
enable_page_level_ads: true
});
</script>
這是您網頁的標頭部分。
<title>示例 HTML 網頁</title>
</head>
<body>
這是您網頁的正文部分。
</body>
</html>
請注意,這只是示例代碼,請勿在您的網站代碼中使用。
在正文頂部添加了網頁級廣告代碼的 HTML 網頁示例
如果您無權訪問網頁的 <head> 標記,則可改為將廣告代碼放置在正文頂部:
<html>
<head>
這是您網頁的標頭部分
<title>示例 HTML 網頁</title>
</head>
<body>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-123456789",
enable_page_level_ads: true
});
</script>
這是您網頁的正文部分。
</body>
</html>
請注意,這只是示例代碼,請勿在您的網站代碼中使用。
作者:資源庫
原文:https://www.zyku.net/xhtml/360.html
打開今日頭條,查看更多圖片※spring 使用Resource 後,修改值(實現思路及spring注意事項)
※使用Python的matplotlib畫折線圖,柱狀圖,三維圖
TAG:程序員小新人學習 |