<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Daniel Haim&#039;s Blog &#187; AdSense</title>
	<atom:link href="http://www.danielhaim.com/tag/adsense/feed" rel="self" type="application/rss+xml" />
	<link>http://www.danielhaim.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 22:57:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to install a Google Custom Search</title>
		<link>http://www.danielhaim.com/2009/11/google-custom-search/blog</link>
		<comments>http://www.danielhaim.com/2009/11/google-custom-search/blog#comments</comments>
		<pubDate>Thu, 26 Nov 2009 12:13:29 +0000</pubDate>
		<dc:creator>Daniel Haim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Search Engines]]></category>

		<guid isPermaLink="false">http://danielhaim.com/?p=89</guid>
		<description><![CDATA[If you're looking to enhance performance on your website's search engine here is a very easy method that will benefit you in two ways. A. You will make revenue from it B. It's better then what you've got already.]]></description>
			<content:encoded><![CDATA[<p></p><p>If you&#8217;re looking to enhance performance on your website&#8217;s search engine here is a very easy method that will benefit you in two ways.</p>
<ol>
<li>You will make money from it</li>
<li>It&#8217;s better then what you&#8217;ve got installed already.</li>
</ol>
<p>If you&#8217;re not an AdSense   member it&#8217;s time you start reading more about how Google can give you the money you&#8217;ve been avoiding.</p>
<p><strong>So what is Adsense Search?</strong> AdSense for search is a free solution that allows publishers to place a search box on their site and earn revenue from relevant ads on the search results page.</p>
<ol>
<li>Choosing the content your users search: your site, a collection of sites you choose, or the entire web.</li>
<li>You can also prioritize and restrict search to specific sections of sites. customization of look and feel &#8211; you choose the colors, location of the ads, and the option to host the results on your site or have Google host them for you.</li>
<li> Monetization of search results pages with targeted ads</li>
</ol>
<p>See it in action:</p>
<p>So how do we do this? Easy Peazy.</p>
<p><span style="font-weight: bold;">STEP 1 (Getting the Google Code)</span><br />
- You will need to go to Google Custom Search <!-- m --><a href="http://www.google.com/coop/cse/">http://www.google.com/coop/cse/</a><!-- m --> and register for an account if you dont already have one. Follow the steps to create a new search engine.<br />
- In the &#8220;<span style="font-weight: bold;">Look and Feel</span>&#8221; tab, you will need to choose the &#8220;<span style="font-weight: bold;">iframe</span>&#8221; option<br />
- Specify a URL in your site where you want the search results to appear: eg <!-- m --><a href="http://your_domain_name/search/">http://your_domain_name/search/</a><!-- m --><br />
- Make sure you specify the advertising be placed on the top and bootom</p>
<p><strong>The Search Box Code and Search Results Code will look like this:</strong></p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<blockquote>
<pre><span style="color: #008000;"><code><span style="color: #000000;">&lt;div id="cse-search-results"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
var googleSearchIframeName = "cse-search-results";
var googleSearchFormName = "cse-search-box";
var googleSearchFrameWidth = 600;
var googleSearchDomain = "www.google.com";
var googleSearchPath = "/cse";
&lt;/script&gt;
&lt;script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"&gt;&lt;/script&gt;</span></code></span></pre>
</blockquote>
<p></code></p>
<p><strong>STEP 2 (Create a Search Page to Display the Google Custom Search Results)</strong></p>
<p>You will need to create a search page for the google search results to be on. Making sure the permalink for the page is the same as you specified above.<br />
- Create a new page named <span style="font-weight: bold;">Search</span> via the <span style="font-weight: bold;">Pages</span> -&gt; <span style="font-weight: bold;">Add New</span> command on the left menu in the Admin panel.<br />
- Edit the post slug if needed to ensure the Permalink is <!-- m --><a href="http://your_domain_name/search/">http://your_domain_name/search/</a><!-- m --><br />
- Click the HTML tab in the post editor.<br />
- Paste the Google Search result code.<br />
- Save and publish the page.</p>
<p><span style="font-weight: bold;">STEP 3 (Modify the searchform.php file)</span><br />
You will also need to modify the searchform.php file. Replace all the contents of the searchform.php file and paste in the Google Search Box code.</p>
<p>For example your new searchform.php file will look like this:</p>
<blockquote>
<pre><span style="color: #008000;"><code><span style="color: #000000;">&lt;form action="http://www.yoururl.com/search/" id="cse-search-box"&gt;
&lt;div&gt;
&lt;input type="hidden" name="cx" value="017284621037843979677:6xpazlqjxva" /&gt;
&lt;input type="hidden" name="cof" value="FORID:11" /&gt;
&lt;input type="hidden" name="ie" value="UTF-8" /&gt;
&lt;input type="text" name="q" size="31" /&gt;
&lt;input type="submit" name="sa" value="Search" /&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"&gt;&lt;/script&gt;</span></code></span></pre>
</blockquote>
<p><span style="font-weight: bold;">STEP 4 Style the Results Page</span><br />
The default google custom search results page may be too wide for the themes page if you dont specify the advertising be placed on the top and bootom. To make it fit on the page change value=&#8221;FORID:10&#8243; to value=&#8221;FORID:11&#8243; in the Google Search Box code. If you need to style the results further you can directly download and manipulate the Cascading Style Sheet (CSS) files that control results styling. Refer to the documentation here<!-- m --> <a rel="nofollow" href="http://code.google.com/apis/ajaxsearch/documentation/customsearch/index.html">http://code.google.com/apis/ajaxsearch/ &#8230; index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhaim.com/2009/11/google-custom-search/blog/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

