Custom Search Engine Adsense According To Certain Post Or Keyword Labels In Blog Posts - Some bloggers mention that the results of the Adsense custom search engine ads are very small, so they decided not to use the custom search engine on the blog.
Their statement is true that the results of displaying the custom search engine (CSE) of Adsense are very small. The reason is that those who search the search box with CSE Adsense on their blog are rare or maybe very rare. Therefore, the results of clicks on CSE ads are very small and may not even exist.
But what if we display the Adsense custom search engine without depending on visitors who search on the search box? How and how can it be done?
The answer is of course you can. We can edit the custom search engine so that the ads displayed are in accordance with the post label or can target specific keywords (preferably with keywords that are still related to niche blogs) and we display them in blog posts.
Of course with this we are not dependent on visitors who do searches to see or click on ads on CSE. Now the view of CSE ads is high because now all visitors can see CSE ads without having to search. So the possibility of clicking CSE ads is higher. It's a shame if this one Adsense Ads for Search feature is not utilized and optimized.
Right at the beginning of the 2019 New Year I also tried my luck with this CSE Adsense, so I can't give the results yet. For the display, you can see on this page (if I haven't changed it) or as in the picture below.
In this CSE, we only display the ads. While we hide the search results. Ads are targeted at keywords in accordance with the label of the post, so it can match the content of the post, or we can use certain keywords that are still in accordance with the niche blog so that it is still in accordance with the interests and interests of visitors.If you are interested in trying it, please follow the steps below.
The first step, please create a custom search engine on the Adsense dashboard on the Ads for Search menu. There is no special trick for creating this Adsense cse, you can choose searches all over the web or only the selected web. Then note the var cx code which is usually like this partner-pub-0123456789123456: 01234567.
The next step please go to edit Blogger HTML and look for the following code.
<b:includable id='post' var='post'>
Kemudian silahkan simpan kode berikut ini di atas kode tadi.
<b:includable id='cse' var='posts'>
<b:if cond='data:blog.pageType in {"item"}'>
<b:loop values='data:post.labels' var='label'>
<div id='cse-results'/>
<script>
var opt = "<data:label.name/>%";
var ppub = "partner-pub-0123456789123456:01234567";
</script>
</b:loop>
</b:if>
</b:includable>
Change the code var cx from the first step. The code above to determine the target keyword based on the label post. If you want to specify keywords with certain keywords, please use the code below.
Jika ingin menentukan keywordnya dengan keyword tertentu, silahkan gunakan kode di bawah ini.
<b:includable id='cse' var='posts'>
<b:if cond='data:blog.pageType in {"item"}'>
<div id='cse-results'/>
<script>
var opt = "keyword%";
var ppub = "partner-pub-0123456789123456:01234567";
</script>
</b:if>
</b:includable>
Change the code marked with the desired keyword, you can also try the post title using the code <data:post.title/>
and adjust ppub
with var cx
from the first step.
Then please copy the following code.
<b:include data='posts' name='cse'/>
Then please paste in the code for the post, it can be above the post or below the post. Usually the code is like this or similar like this.
<b:if cond='data:blog.pageType == "item" or data:blog.pageType == "static_page"'>
AVE HERE
<data:post.body/>
OR SAVE HERE
</b:if>
Finally, please save the following code above the code</body>
<b:if cond='data:blog.pageType in {"item"}'>
<style>
/*<![CDATA[*/
#cse-results{width:100%;margin:0 auto}
.gs-imageResult .gs-snippet,.gs-webResult .gs-snippet,.post-body a[href^="http://cse.google.com/"]:after, .post-body a[href^="https://cse.google.com/"]:after,.post-body a[href^="http://cse.google.com/"]:hover:after, .post-body a[href^="https://cse.google.com/"]:hover:after,.gsc-adBlockNoHeight~.gsc-resultsbox-visible{display:none}
.gcsc-branding-img-noclear{width:50px!important;height:15px;vertical-align:middle!important;}
.gsc-above-wrapper-area,.gsc-adBlock{border:none}
.gsc-above-wrapper-area,.gsc-webResult .gsc-result{padding:0!important;border-bottom:0!important}
.static_page .gs-imageResult .gs-snippet,.static_page .gs-webResult .gs-snippet{display:block}
.gsc-adBlock{margin:0 -4px}
/*]]>*/
</style>
<script src='https://cdn.staticaly.com/gh/KompiAjaib/js/master/jsapi.js'/>
</b:if>
Now please check the display of Adsense cse in the blog post.
Hopefully it will be useful.