產生 AdSense 程式碼後,您需要在網站的 <head> 和 </head> 代碼之間貼上這段程式碼。為了發揮 AdSense 的最大效益,建議您在網站的每個網頁中都放置 AdSense 程式碼。
AdSense 程式碼的加入位置
請參閱下列 HTML 範例,瞭解放置 AdSense 程式碼的正確位置:
「未」加入 AdSense 程式碼的 HTML 網頁範例
<html>
<head>
這部分為頁首。
<title>HTML 網頁範例</title>
</head>
<body>
這部分是網頁內文。
</body>
</html>
「已」在 <head> 代碼中加入 AdSense 程式碼的 HTML 網頁範例
<html>
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous"></script>
這部分為頁首。
<title>HTML 網頁範例</title>
</head>
<body>
這部分是網頁內文。
</body>
</html>