AdSense for Search

AdSense for Search and Drupal sites

Google's AdSense programe includes "AdSense for Search" which allows you to create a search feature you can put on your own site. With this, you can also specify that the search results are only from specific sites (e.g. only from your own site(s) as well as from the entire web. This is a doubly useful package as it provides the ability for your visitors to be able to do a search directly from you site(s). Additionally, Google will also serve up relevant ads on the search results page that will give you another change to earn AdSense revenue if/when your visitor clicks on any of these ads.

I personally recommend that you employ AdSense for Search. It has a significant impact on your site's revenues.


How do you make money with AdSense for Search?

Quite apart from any money revenue stream, having a search engine on your site is a benefit to your users. With AdSense for Search, each time a user does a search, they will be taken to a search results page. On that page will be Google driven ads. You earn revenue each time the user clicks on an ad (not on a general search result listing) in the search results page.

Google will place contextually relevant ads on your search results page.

Google used to have (and may still have. Google Help info is not very helpful or clear about this as at Feb 2010) to offer what they called a CSE (Custom Search Engine). That is, Google offered you the ability to create a search engine for your site - which was called a CSE. And if I remember correctly, you can edit it later and change settings.

At the time of writing this side note (Feb 2010), I am not sure if Google still offers the ability to create a CSE, or if they are in some transition stage of trying to integrate the existing CSEs with their newer product, AdSense for Search. I can't find any clear documentation of what is going on at Google and the tutorials and guides they have on CSEs seem to be outdated and no longer applicable.

I would however like to quote an excerpt from one of Google's Help topic:
"If you already have an existing AdSense account, we recommend that you create all of your search engines in AdSense for search and only use the CSE page to access advanced features."
~ from Google's help article "What's the difference between AdSense for search and Custom Search Engine?"

So I will just ignore CSEs all together and only talk about AdSense for Search - as they seem to be right now.


AdSense for Search Programme Policies

(ref: Google AdSense Programme Policies)
  • Maximum of 2 AdSense for Search boxes per page.
  • On search results page - can have only 1 search box and/or 1 'link unit'. No other Google ads may appear on the search results page.

Create an AdSense for Search

Log into your AdSense account > AdSense Setup[tab] > Adsense for Search.

Most of the steps required are pretty self-explanatory so I will just point out a few features that are directly relevant to a Drupal site.

AdSense for Search - search type

Specify Search Type:

You have 2 choices here; to allow your users to get the results for their search query:
* only from your own site(s) or
* from the entire web.

I would recommend the former. Your users, when they find what they are looking for from your site(s), will stay longer on your site(s). And anyway, in the search results page, if you put in another search box there, they have the ability to choose if they would like to do another web-wide search.

List Selected Sites

selected sites for AdSense for Search

Here you can specify one or more sites, pages, sub-domains from which your users will get their search results. This is useful if you have more than one site or have sites you know are likely to be of use to your users.

You can list the following types of URLs (one URL per line):

  • Individual pages: e.g. www.mysite.com/thispage.html
  • Entire sites: e.g. www.mysite.com/*
  • Entire domains: e.g. *.mydomain.com or just mydomain.com
  • Certain parts of sites: e.g. www.mysite.com/*health* (i.e. search results will only be from pages in your site that has 'health' in their names)

Specify Optional Keywords

What is the purpose of specifying optional keywords?

As I mentioned above, when a user users your AdSense for Search search-box on your site, they get sent to a search results page. On this page will be Google driven ads. Specifying the optional keywords here increases the likelihood that Google will deliver up more ads that are truly relevant to your site's core topics or the topic of your search engine (if you have a different search box in different topical sections of your site). The more relevant the ads are (on the search results page), the more likely your users will find them useful and so will click on them. And it is only when they click on the ads that your earn revenue.

Examples of possible theme-related keywords:

Website Theme Possible Keywords
jewelry jewelry, jewelry making, beads, craft
Mac Apple, Mac, OS X

More Options

Most of the choices you have to make here are quite self-explanatory. I just want to comment on:

To have or not to have Custom Channels
This is optional. But it is a good idea to create a new channel and especially if you have multiple sites, to prefix your channel with some your site name or initials of your site name. That makes it much easier for you to later get reports for the performance of each channels and the ads and search performances related to each site. Custom channels are also great if you are creating multiple search boxes, one for each different section of your site.

Remember to uncheck "Automatically create a new channel" because there seems to be some kind of glitch so that even though you create a new channel yourself, Google creates 2 channels (the automatic one and the one you specified and named). You then end up with 2 channels for the same Search Engine feature which can make your AdSense reports a bit confusing and misleading.


Choose Search Box Options

AdSense Search Box Options

Here is your opportunity to custom style the search box so that it suits and fits the look of your pages. As you select each radio box, the sample search box will change according so you can preview the look of the box.

Similarly, you can vary the length of the search box in the "Text Box Length". The sample shown will also change accordingly.

The length of the box can be varied later by changing the number in the code which you will get for pasting into your web pages.


Search Results Style

Search Boxes vs Search Results Page

We will be discussing search boxes and search results page. It can be a bit confusing if you don't have a clear picture of the differences and the process.

The page that contains your search box is (not necessarily) the same page where the search results appear. When a user does a search, the results appear in another page. Click on the small image here to get a clearer idea.
Search Box page vs Search Results page

AdSense Search Results style

You have 3 options for the display of your search results.

  • Open results in the same window
  • Open results in a new window
  • Open results within your own site

In the first 2 options, the visitor actually leaves your site and goes onto Google's site where the results are displayed.

Normally option (3) would be the (personal) favourite option as you have much more control over the look and feel and the visitor does not leave your site.

However with Drupal, that is not quite straight forward (unless you have a Drupal contribution module that will do this for you. But I prefer to have minimal additional installations whenever possible).


Why it is not straight forward to display search results in a Drupal page, within your own site?

To easily display the search results in a designated page on your Drupal site is not easy because:
1) First, you need to create a page in Drupal for the search results to appear (Google will give you the code to put on this page when you finish your adSense for Search configuration. This is not the problem). The URL of that Drupal page will either be an alias (if you have the Pathauto contributed module installed) or will take the form of ".../node/129"
2) Then when search results are generated, Google appends a query string to the end of the name (URL) of your search results file-name. When that happens, Drupal will not recognize that modified file name and will display a "Page Not Found" result. (This is the problem)

So if you have a Drupal site and you don't want to install anymore contributions?

Easy option for Search Results page

You choose either option (1) or (2) .. i.e. for the search results to appear either in the same or a new window. (I prefer the latter as it leaves as the window with your site remains open for the user).

Once you do that, Google still kindly gives you a way to customize the search results page via the ability to include your site logo.

You can either have your logo appear to the left or above the search results. Google tells you what size-dimensions is allowable for each option and the file formats for the logo.

Adsense for Search: Left Logo Adsense for Search: Top Logo

As you can see, the file formats for the logo can be: .jpg, .png, or .gif
If you choose to have a left logo, the maximum logo dimension is 100x100px.
If you choose to have a top logo, the maximum height is 50px (but the width can be much longer, and is not specified by Google).

Obviously you must create or have a suitable logo (image) you can use; upload that and then specify where that logo image is located. What is very good about this is that you can designate a destination URL (e.g. your homepage) so that your visitor can click the logo and return to your site.

Work-around solution: Search Results to appear within your own site

AdSense search results on own site

Okay, let's say you are quite determined to have the search results display in your own site (and not have your visitors leave your site). And I applaud you because it is a good thing. Furthermore, if you can create a page within your own site - then you have better control over that page - including adding another search engine on that page (so that your users can easily conduct another search in your search results page) and/or a Link Unit. Which will help with your revenue optimization.

According to Google's Programme Policies, you are allowed to insert maximum of only 1 search box and 1 Link Unit into your search results page.

So how do we do this? Remember that it is no use to create a page for your search results within Drupal.

  1. Create a simple HTML file , name it appropriately (e.g. sitename-search-results.htm).
  2. Because it is not created in Drupal, there will be none of your normal navigations and menus on the page. So, put in your logo at the top which is hyperlinked back to your main page. That way, users can easily return to your (Drupal site's) home page with one click.
  3. Upload the file.
  4. If you have a multi-site Drupal installation, you might want to upload it to:
    /sites/all/ folder.
    In that case, the URL will be: www.yoursitename.com/sites/all/sitename-search-results.htm
  5. AdSense Search Results Style In the "Enter URL where search results will be displayed", you have to enter the complete URL of the (results) page that you just created and uploaded.
  6. Optional, for later: You can edit this results page of yours at any time. You can add images or as alluded to before, later add the allowable 1 search box and 1 Link Unit if you like.

That's basically it for the workaround solution. Now you have a results page that is under your control and that is within your site/domain. When you get the code you need, you can test this out. For now, let's carry on with the remaining steps to create your AdSense for Search.

Enter width of results area:
The default is 800px and usually that will work for most results pages. This is the horizontal width across for the lists of search results.

Google does not allow any width less than 795px.

Select Ad Location

On the search results page, Goggle will automatically serve up relevant ads. Here you specify where you want those Google ads to appear on your results page.

Google recommends "Top and Right" for revenue optimization purposes.

AdSense for Search color palette

Palette

Unlike AdSense for Content, you cannot have your own customized color palettes here. Google provides you with a set of predefined palettes. You can try each one out and the sample will reflect the changes. Choose the one you think will best suit your site.

These can be changed later if you need to.


Get Search Code

You get to name your search engine just before you finish your configuration and get your required codes. Click the "Submit and Get Code" button and you will be taken to a page with the codes.

If you have selected before that you want the search results to appear within (a page) on your own site, then there will be two snippets of code.

  • One to be pasted into the pages where you want the search box.
  • The other is to be pasted into the search results page you created earlier. Paste it where you want the search results to appear.

If you have not selected to have search results to appear within your own site, then only one snippet will be created. That is to be pasted into pages where you want the search box to appear.

Code and Drupal sites

Tip for Drupal sites:
You can use the 'block' modules to help you place your custom Google search box.
Create a block and paste the code in the block. Save.
Then you can place the block in the region you want and configure who is able to see it and on which pages it should appear.


How to edit your AdSense for Search settings

Log into AdSense > AdSense Setup[tab] > Manage Ads

Locate the AdSense for Search you created, click the "Edit Settings" link.

Each time you change your settings, the code for the search box will probably change. You need to get the new code and re-paste it into the pages with the search boxes.

If you have your own search result page, the code for that is unlikely to change. Double-check anyway.


References

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 

Healthful Soulful Things

Custom Search