下面介紹了如何使用Google的AdSense來(lái)為你的網(wǎng)站設(shè)置廣告?;緝?nèi)容包括:
- 創(chuàng)建一個(gè)AdSense賬號(hào),你必須18歲以上,有一個(gè)Google賬號(hào)以及地址
- 你的網(wǎng)站必須已經(jīng)被激活,并且你的網(wǎng)站內(nèi)容必須符合AdSense政策
- 創(chuàng)建響應(yīng)式布局廣告單元,可以在任何的設(shè)備上自動(dòng)調(diào)整廣告大小
- 確保payment的設(shè)置,坐等錢(qián)來(lái)
創(chuàng)建一個(gè)包含廣告的簡(jiǎn)單網(wǎng)頁(yè)
在排練預(yù)演中,你將要?jiǎng)?chuàng)建一個(gè)包含響應(yīng)式廣告的簡(jiǎn)單頁(yè)面,使用Google AdSense和Web Start Kit。
如果你不熟悉 Web Start Kit, 參考 Set Up Web Starter Kit 文檔
為了讓你的網(wǎng)站包含廣告且賺錢(qián),你需要遵循以下步驟
- 創(chuàng)建一個(gè) AdSense賬號(hào)
- 創(chuàng)建廣告單元(ad units)
- 將你的廣告放置在頁(yè)面上
- 設(shè)置你的payment
創(chuàng)建一個(gè)AdSense賬號(hào)
為了使用AdSense服務(wù),你首先得創(chuàng)建一個(gè)AdSense賬號(hào),創(chuàng)建賬號(hào)得遵從如下條件:
- 你至少18歲以上且擁有一個(gè)已確認(rèn)的谷歌賬號(hào)
- 你有一個(gè)符合Google AdSense項(xiàng)目政策的網(wǎng)站,查看具體條約,請(qǐng)點(diǎn)擊:Google AdSense program policies
- 你有一個(gè)和你的銀行賬戶相關(guān)聯(lián)的郵局地址亦或email地址,來(lái)收取你賺的錢(qián)
創(chuàng)建廣告單元
一個(gè)廣告單元是一系列將展現(xiàn)在你網(wǎng)頁(yè)中的廣告,它們將通過(guò)你網(wǎng)頁(yè)中的js來(lái)實(shí)現(xiàn)。你有以下三種方式來(lái)控制你廣告單元的大小:
如果你的網(wǎng)站是響應(yīng)式布局的網(wǎng)站,那么使用響應(yīng)式布局的廣告。如果你不使用響應(yīng)式布局廣告單元模式,那么你講書(shū)寫(xiě)一大堆的代碼來(lái)讓廣告在不同設(shè)備上顯示不同的大小。
在Google AdSense 中Guide to ad sizes 中追蹤最好的廣告大小 top performing ad sizes 。
創(chuàng)建響應(yīng)式布局廣告單元
- Visit the My ads tab.
- Click +New ad unit.
- Give your ad unit a unique name. This name appears in the ad code that’s pasted into your site, so be descriptive.
- Select Responsive from the Ad size drop-down.
- Select Text & display ads from the Ad type drop-down.
- Click Save and get code.
- In the Ad code box that appears, select the Smart sizing (recommended) option from the Mode drop-down. This is the recommended mode and doesn’t require you to make any changes to your ad code.
創(chuàng)建你的廣告單元之后,AdSense 提供了一個(gè)包含你的網(wǎng)站的代碼,相似如下:
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><!-- Top ad in web starter kit sample --><ins class="adsbygoogle" style="display:block" data-ad-client="XX-XXX-XXXXXXXXXXXXXXXX" data-ad-slot="XXXXXXXXXX" data-ad-format="auto"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({});</script>
Note
-
data-ad-client
和 data-ad-slot
對(duì)每一個(gè)你創(chuàng)建的廣告而言都是獨(dú)一無(wú)二的 -
data-ad-format=auto
標(biāo)簽在創(chuàng)建廣告代碼時(shí)允許響應(yīng)式布局廣告單元中的廣告自適應(yīng)設(shè)備大小
將廣告單元包含到你的網(wǎng)站中
為了將廣告包含到你的網(wǎng)站中,你需要在你的網(wǎng)頁(yè)中嵌入上面AdSense生成的代碼。
如果你想要生成多個(gè)廣告,你得為你的廣告重新使用廣告模式亦或創(chuàng)建多個(gè)廣告單元。
- 在app文件夾中打開(kāi)index.html
- 將你的代碼嵌入到main標(biāo)簽中
- 保存文件,打開(kāi)瀏覽器使用谷歌開(kāi)發(fā)工具中的移動(dòng)端設(shè)備視圖查看效果
Remember
- 將所有的廣告代碼放置在body標(biāo)簽里面,否則,廣告將不會(huì)起作用!
設(shè)置payment參數(shù)
想知道在AdSense中你如何獲利?
- Verify you’ve provided any required tax information in the payee profile.
- Confirm your payee name and address are correct.
- Select your form of payment on the Payment settings page.
- Enter your personal identification number (PIN). This PIN verifies the accuracy of your account information.
- Check to see if your balance reaches the payment threshold.
查看跟多消息: Intro to AdSense payments
原文:https://developers.google.com/web/fundamentals/discovery-and-monetization/monetization-with-ads/include-ads?hl=en
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。