Is Google adsense available for localhost?

前端 未结 5 1668
悲哀的现实
悲哀的现实 2020-12-14 07:15

Is it possible to run google adsense ads on a local server as a try out for a example application? I want to implement Google adsense ads in my web application which is runn

5条回答
  •  我在风中等你
    2020-12-14 07:46

    Yes it is possible (as of 2015). There is a special parameter, to use Adsense on Localhost without risks.

    Today the AdSense code is different. If you want to add the adtest-parameter use data-adtest="on" within an ins block. Here is an example code:

    
    
    
    
    

    Found this on Google AdManager Help:

    It shows a basic tutorial on how to achieve this.

    Test Ad Exchange tags without charging advertisers or recording clicks and impressions

    Add the google_adtest = on; parameter to your ad tag to specify that this is a test implementation. Make sure you set this parameter to "on" to ensure that clicks and impressions aren't recorded and advertisers aren't charged. The default value is "off".

提交回复
热议问题