Serence

This passage compiles the procedures to use adsense and some major problems like "avaliable width = 0" problem that people face when using adsense.

2. Preparation

• A blog with some original articles

3. Application - From Yiyun's Blog

1. Apply for adsense - Click
3. Waiting for verification - will last about 2 and 3 days

4. Configuraiton

Auto ads is put in your website by using machine learning techniques from google. You can also customize the settings to determine whether to show an ad in a certain places.

From its name, we can know that its for websites that has feed(usually this type of ad is put at the home page). You can determine which place to put this ad, and you can also determine how many ads do you want to place in your feed. If you are using gridea, you can look for the following code to add In-feed ads in your feed page:

<% if (seq % 3 == 0) {%> <ins class="adsbygoogle" //seq is from <% posts.forEach(function(post, seq) { %>
style="display:block"
</script> <%} %>


This type of ad is used in article. The formal suggestion is to put this ad at the end of the second paragraph of the article. This ad can automatically detect your content and put suitable ads in your article.

Besides these ads, you can also choose the type of ads you want to show in your website and manually censor all the ads that has appeared in your site.

In this place, you can approve or block ads.

However, this procedure may take you a lot of time. Thus, you can go to the Content ads to determine whether you want certain type of ads shown in your website(Like the ads about sex).

5. Problems

But you will face some problems when using adsense.

• Fluid responsive ads must be at least 250px wide

There are two ways to solve this problem:

1. If you are using Jquery, you can use the following code from galeksic
<script>
/* Warning: this is non-recommended code */
});
</script>

1. I discover another solution to solve this problem:

Put the following css code in your css file:

ins{
width:100% !important;
display:block !important;
}

//Replace this code with the new one

//new
}


This can solve the problem, but sometimes it doesn't work either. But most of time, it can ensure that ads can be shown in your website.

6. Ending

Please notice: you can withdraw only when you earn greater than or equal 100\$ in adsense.

[1]

[2]

EOF

Darkmode

2020 年度书单