Saturday, September 04, 2010
 
Share/Save/Bookmark
HowGeniusDotNetNukeDNN and AdSenseDNN and AdSense for Search
  Login     Register
Dot Net Nuke and AdSense for Search
How To Integrate AdSense for Search with DNN Minimize

Part 1: Summary, Preparation, and Prerequesites

Overview

The DotNetNuke (DNN) engine is a powerful, free, open-source content and portal management system based on Microsoft's ASP.Net technology. Built in to the DNN platform is the ability to search your website, or the entire web, using a Google Custom Search Engine (CSE). As shipped, DotNetNuke's web search (and site search, if you have it configured to use the built-in CSE) returns search results in a pop-up window that displays a page actually hosted by Google. This results page - as with all but a few specially-configured Google searches, whether based from Google.Com or using a CSE, also includes advertising.

There are two issues with the DNN-CSE that are addressed in this article. The first is pretty straightforward: every new version of the most popular web browsers has increasing levels of pop-up window detection and prevention. This can cause searches performed at your site to appear to have not worked, when in reality the 'broken' part of the process is on the user end and (mostly) out of your control.

The second issue is slightly more complex. Google has a program by which, if you are an AdSense Publisher, you can tie your Custom Search Engine to your AdSense account and get paid for ad clicks generated by your search results window. There's a point of ethics involved here: the DNN platform is (or at least can be) free, and open-source. The default DNN CSE is configured with their AdSense account tied to the search results. Some people may feel that this is a fair price to pay for a very good CMS that costs nothing, and may choose to only modify the search engine so that it displays results without opening a new tab or window. Others may choose to alter the search process so that it both displays results in the original window, and to tie their own account in to the CSE so that they, rather than DNN, get paid for ad clicks in search results. This is particularly relevant to those DNN users who employ the paid version of DNN; after all, in that situation, the good people at DotNetNuke have already been compensated, at the price they set, by you; it's certainly not unreasonable - nor is it a violation of your DNN license - to choose to keep the ad revenue produced by search results.

What you'll need before you get started

A comprehensive discussion of the various steps involved to download and install DotNetNuke; to register for, configure, and implement AdSense; to register for, create, configure, and implement a Google Custom Search Engine; and to tie your AdSense account to your CSE(s) is outside the scope of this document, and will not be covered here. Be aware that these required steps can take a fair amount of time. Not only are the installation of DNN and the creation and configuration of a Custom Search Engine fairly complex processes, but registering for AdSense can sometimes take several weeks from the time you apply to the time you are approved.

With this in mind, we strongly recommend that you complete these steps before continuing to read further. Bookmark the site and come back when you're ready to go; we promise we'll still be here ;-). Remember: You have to have a registered domain (or a blog, but that doesn't factor in here) to get AdSense, and you have to have at least one CSE built in order to link your AdSense and CSE information so "your" ads will show on the search results pages.

Assumptions

This article assumes you are familiar with basic computing and web design concepts like file paths and basic HTML/XHTML syntax. This article also assumes that you know how to create a Custom Search Engine using AdSense for Search. If this assumptions are false, we recommend in the strongest possible terms that you get familiar with these concepts, tools, and techniques before proceding any further.

Special Note:  Special Note: Due to inconsistencies between browsers, Internet Explorer may cause lines of code to "wrap" and appear as multiple lines when they should be on a single line.  Please keep this in mind if you copy and paste code from this article.

Process Summary

To deploy your AdSense for Search tool in a DotNetNuke installation, you will perform the following steps:

  • Create and edit new code-behind files for your DNN search engine
  • Create a new AdSense for Search Custom Search Engine
  • Edit several files in your DotNetNuke installation to reference the modified files and/or code
  • Add your AdSense for Search results code to the Search Results page of your site.

AdSense Program Policies

Google has very rigid rules and policies governing their AdSense program, including the use of AdSense for Search or an AdSense-enabled Custom Search engine. We cannot recommend emphatically enough that you read and understand all of the relative rules and policies before you begin implementing the process described here. If you don't pay attention to the rules, it is fairly easy to run afoul of them...and if the AdSense team smacks your account with a banhammer, it is nearly impossible to get it reinstated and you can't register for a new one. For all practical purposes, you get one shot at this, so don't screw it up.

Important Links

These links will take you to the tools and documents you need to get started.

  • DotNetNuke.Com - the home page of the DotNetNuke content management system
  • Google's AdSense - the home page of Google's AdSense program. If you are not already an AdSense publisher, start here.
  • Google's AdSense Help System - Links to a lot of useful material, as well as important information like the AdSense Program Policies and the Help Forum (where you might see someone you know)
  • Google's Custom Search Engine - This is where you go to start building your custom search engine.
  • Visual Web Developer 2008 Express Edition - This is a surprising, and underutilized, tool from Microsoft. A full-featured X/HTML-ASP.Net-CSS editor with more tools and abilities than one can write about in a short sentence, and it's absolutely free. It's not necessary to use this, or any other tool, to make the changes discussed in this article...but it definitely makes things easier.

Down to business

Now you're prepared to begin making changes to your site. To make the complete change from pop-up search results with DNN's AdSense ads to same-page search results using your own AdSense account, you'll need to change settings in the skin files that your site is running, and in the 'master' configuration files, and finally integrate the code Google gives you into your search results page.

 
LowGenius Sites Minimize

Sponsored Links

DNN and AdSense for Search
Copyright © LowGenius Enterprises
Terms Of Use | Privacy Statement