Thursday, February 18, 2010

Expanding Your Horizons

> Eric: So, how's it been going? I've been peeking at your site
every once in a while. You've done a great job at filling
it with content.


> Claude: It's actually going pretty good. I'm definitely into
the updating stage, I'm pretty sure I have enough content
right now to keep visitors happy.


> Eric: So what are you going to do now? Let the site coast and
the money roll in?


> Claude: I wish! There's a lot of competition for the voice-over-IP
stuff, so I won't be buying a house in Bermuda
anytime soon. But I am making money, which is great.
And I have been looking at some other things. You mentioned
affiliate and referral programs and I got curious
about them so I did some research and what I found
out was surprising.

Claude and I met for lunch a few weeks later. I wanted to catch up on what he and his daughters had been up, but we didn't need our computers for that.

"So," I began, after placing the food order, "how's it been going? I've been peeking at your site every once in a while. You've done a great job at filling it with content."

"It's actually going pretty good," Claude said. "I'm definitely into the updating stage, I'm pretty sure I have enough content right now to keep visitors happy. Stef's also happy with her blog."

"Yeah, I can tell," I said, "I've been reading it on occasion. She's even talked about the process she went through to put up the ads and how easy it was." I laughed. "She's become an AdSense expert!"

"Yeah," he said, "she's definitely enthusiastic about it. Mind you, she's enthusiastic about everything she writes about in her blog. Too enthusiastic about some things, to my mind."

"Oh, don't be such a grumpy father," I said, "I'm sure if you were her age you'd be writing things your parents didn't approve of. How's Anita doing?"

"Well," he began, "obviously she doesn't have as much time as I do to work on her Web site. But I think it's coming along well. She's not out to make a lot of money either, so her goals are different."

"So what are you going to do now?" I asked him. "Let the site coast and the money roll in?"

He laughed. "Hah! I wish," he said. "There's a lot of competition for the voice-over-IP stuff out there, so I won't be buying a house in Bermuda anytime soon. But I am making money, which is great. I just can't retire from it."

"But you are retired," I protested.

"You know what I mean," he said.

"Claude," I continued, "now that you've been bitten by the AdSense bug, you've discovered you have an entrepreneurial side you never knew you had. Am I right?"

"Well," he said, somewhat sheepishly, "you're probably right. I have been looking at some other things."

"Setting up another site?" I asked.

"That," he admitted, "but other things, too. You mentioned affiliate and referral programs in our last group session and I got curious about them."

"Really?" I said. "So what did you do?"

"I did some research," he continued, "and what I found out was surprising. Did you know there are people out there who buy AdWords ads and don't actually sell anything? All they do is refer people to other sites and make money when those people buy something."

"That's right," I agreed, "it's strictly a numbers game again. If an ad costs you ten cents per click and you get five dollars every time someone buys the product or service you're referring, you come out ahead if at least two out of every fifty clicks leads to a sale."

"Yeah, and some people claim to do quite well at it," he said, "but it's kind of risky for me. You can spend a lot of money and not make anything at all. No, I'm not ready for that just yet! But I did sign up for Amazon's affiliate program."

"For the books, I take it?"

"Yeah," he said, "since I already had a list of recommended books on my site, it was a natural fit. Now, if anyone buys a bookor almost anything elseon Amazon because of me, Amazon pays me a commission."

"Was it hard to do?" I asked him.

"Hard? No. If you have a Web site already, it's easy to do. Here, let me tell you all about it." And he did.

But that's another story.

It Takes Time

"The important thing to remember about these approaches, however," I said, "is that they take time to be effective. Your sites are up, but your work isn't overyou'll need to keep working on them."

"But you don't have to spend a lot of time, do you?" Anita asked. "It's been hard to find the time to build my site. I was looking forward to taking a break."

"It depends on what your goals are for the site," I answered. "You can certainly let it coast for a while. If your costs are minimal and the site's bringing in more than you're spending on it, you can afford to work on something else."

"Like another site!" Claude laughed.

"Yeah, or maybe some extra sleep," I suggested. "Anyhow, just be patient and work at it." I leaned back in my chair. "I think we're pretty much done now. Feel free to call me with any questions, but there's not much more to tell you other than wishing you good luck with your ventures. And be sure to let me know how things are going."

Tracking Visitors to Your Site

Tracking Visitors to Your Site

"Well, I'm willing to try it out," Claude said. "It sounds easy enough to do."

"It is," I said, "but it brings up an important topictracking where your visitors are coming from. If you're spending money to get traffic, you want to know if you're wasting your money or not!"

Tracking Visitors with Referrer Headers

When you click a link, the browser contacts the Web server specified in the link and requests the appropriate page. The browser sends extra information along with the request. One of those pieces of information is known as the referrer header, which tells the Web server how the browser was referred to the page.

Suppose, for example, that a visitor to the page www.ericgiguere.com/index.html clicks that page's link to www.memwg.com/index.html. As part of the the page-fetch request, the Web server hosting www.memwg.com gets a referrer header that looks like this:

Referer: http://www.ericgiguere.com/index.html 

(The word "referer" is misspelled deliberately, for historical reasons.) Now, the browser is not required to send the Referer header when it requests a page. Some users disable the header for privacy reasons, but most browsers send them quite routinely.

Tracking referrers is a great way to find out more about how visitors arrive at your site. You can tell when someone finds your site with Google, for example, because the referrer header starts with "http://www.google.com." Usually, you can even tell what keywords they used to find you. Consider the following referrer header as an example:

Referer: http://www.google.com/search?num=100&q=voip+long+distance 

This header tells you that the visitor found your page with the search terms voip long distance (spaces are represented by plus signs). This kind of information can help you fine-tune your pages and can even suggest new keywords and topics for your site.

Ask your Web hosting service how to track referrer informationit varies from system to system.

Tracking Visitors with Landing Pages

Referrer headers aren't the only way to track visitors. Advertising campaigns can also use special-purpose landing pages for tracking clicks. You create a separate landing page for each of your advertisements. The landing pages have no content; all they do is redirect the browser to another page on the site. Each time someone clicks one of your ads, the visitor gets sent to the appropriate landing page before being redirected to the actual destination page.

For the visitor, it's just as if the browser went directly to the destination page, but you've actually gathered a valuable piece of information: exactly which ad brought the visitor to your site. By examining your Web server's access logsfiles that record browser page requestsyou can quickly determine which ads are working well and which aren't.

An alternative to creating landing pages is to embed a unique identifier into the Web address (the URL) used in the ad link. Just add a question mark to the end of the URL and a name-value pair like "from=ad1." (This is called a query parameter.) In other words, instead of using this URL:

http://www.voip-at-home.com/index.html

use the following URL for one ad:

http://www.voip-at-home.com/index.html?from=ad1

and this URL for a second ad:

http://www.voip-at-home.com/index.html?from=ad2

You can easily pick these out from the Web server's access logs.

The great thing about landing pages and query parameters is that they work even if referrer headers are disabled.

Advertising Your Site

Advertising Your Site


"Shouldn't you also pursue traditional promotional opportunities?" Anita said.

"Such as?" I asked.

"Such as getting profiled in the local newspaper or getting a radio interview."

"Absolutely," I said. "Everything helps. But those things rarely happen for niche topicsnewspapers and radio stations want topics that interest a broad cross-section of their audience. Still, it's certainly worth a try once your site's established."

"You mentioned one other thingadvertising your site," said Claude, "which sounded kind of bizarre to me. The costs would just eat into your profits."

"Not if you do it right," I said. "The key is to make more money from the extra traffic than you're paying to get the traffic. As long as you do that, you'll be ahead."

"So you want us to sign up for AdWords?" Stef asked.

"Not necessarily," I answered. "AdWords is the obvious choice, yes, and you already know how it works thanks to our previous session on keyword valuation. In fact, we even went as far as setting up a fake ad campaignremember that?" They all nodded. "But AdWords isn't the only choice. You can sign up for link-exchange programs. You can buy banner ads. Don't worrythere are lots of ways to spend your advertising budget! I'd start with AdWords, though. It's a proven advertising vehicleStef's already benefiting from it, after alland it doesn't cost much to try out."

"But how likely is it that we'll make more money from buying ads that are similar to the ones we're already showing?" Claude said. "Wouldn't they cost us the same or even more?"

"Probably," I admitted. "It depends on what you're trying to accomplish. If you just want to build awareness and get some more eyeballs viewing your site, something like AdWords works well. If you want to generate direct revenue from the ads, you need to do one of two things: either use low-cost keywords to target pages with high-paying keywords, or use affiliate and referral programs that pay you money whenever someone buys a product or service because of you."

Spreading the Word About Your Site

"So getting a good ranking is a slow process," Claude said, disappointed. "That's too bad."

"Well, if it were truly easy, everyone would be doing it," I said, "and nothing would be any different anyhow. Watch out for scam artists who'll promise you high rankings in exchange for a hefty fee. A quality search engine optimization consultant won't promise overnight results. You have to think long-term."

"What about the short term, then?" Stef asked. "Can you do anything to get more traffic while you're working toward a higher page ranking?"

"Sure you can," I said, "by spreading the word about your site."

"You mean publicizing it," Anita said.

"Yes," I agreed, "but not as formally as you might think. Actually, the term that's in vogue these days for what I'm about to describe is viral marketing."

"Viral? As in infections?" Claude asked.

"Exactly," I continued, "but without the negative connotations. The basic idea of viral networking is to use word-of-mouth recommendations and subtle or subliminal mentions to get people to visit your site."

"But why is it called viral?" Claude asked. "I still don't understand."

"I know," said Stef, "it's because the Internet makes it easy to spread the word about something. Like in a blog posting. Or by sending an instant message to your friends."

"You're absolutely right, Stef," I agreed, "the basic premise of viral marketing is to create a self-perpetuating buzz about a product or service. Get a few key people recommending your product and they'll tell their friends, who'll tell others, and so on."

"I've read about this before," Anita said. "Viral marketing is used to promote new pop stars, to get a buzz about them going in the chat rooms."

"Well, I'm not suggesting you hire people to flog your site in chat rooms," I said, "but there are some simple things you can do to get the word out."

Embed Web Addresses

A simple but effective technique is to embed your site's Web address in all your outgoing mail messages and forum postings. The easiest way to do this is by setting up a signature. A signature is a brief message (keep it between one and four lines) that is automatically appended to your messages or postings. For example, Claude might send an email like this:


Dear John:

Thanks for the email, I'm glad you liked the movie. We
really enjoyed it, too. Talk to you soon!

Claude
My site about Internet phoninghttp://www.VoIP-at-Home.com

The last two lines of this message are the signature. It's usually stored in a separate text file (Figure 9.7). You then adjust your email application's options to append the signature file to outgoing messages (Figure 9.8). You do a similar thing with online forums and chat rooms, embedding Web addresses in your signatures and/or profiles.

Figure 9.7. Creating a signature file.


Figure 9.8. Automatically appending a signature to outgoing mail.


Be sure to add the "http://" prefix to the Web address. Most mail readers use that as a cue to automatically transform the address into a link that the reader can click to jump directly to the Web site.

Be discreet when using signatures, and keep them short. If you've chosen a good domain name, you shouldn't need more than a line or two to mention it.

Create or Write for Newsletters

Once you develop expertise in a subject, consider either creating your own newsletter or writing articles for other newsletters. Newsletters are somewhat old-fashioned, but they're easily forwarded from one person to another and can be printed out for later reading as well.

Creating a newsletter is actually a lot of work, especially if you intend to publish it on a frequent schedule. You'll need mailing-list management software to maintain the subscriber list. Your Web hosting provider can often create a mailing list for you. The hard part is coming up with good content on a regular basis. Be sure to promote your Web site in the newsletter.

Ad Newsletter

Martin Lemieux's SmartAds newsletter (www.smartads.info/newsletter/) is an interesting example of a newsletter devoted specifically to Web ad trends.


Writing for other newsletters is simpler, especially if you're not expecting to be paid for your work. Mention your site in the author biography at the end of the articleif people like what you said, they'll probably visit your site to learn more about you and/or the topic.

Spam Ban Plan

Google has a plan to ban comment spam. See www.google.com/googleblog/2005/01/preventing-comment-spam.html.


Use (But Don't Abuse) Blogs

In some ways, blogs are the modern form of newsletters. If your site isn't itself a blog, consider adding a blog. You can do what Stef does and use a free blogging service like Blogger. Or your Web hosting provider may be able to add one to your site for you.

Once your blog is up and running, add an entry to it whenever you make a significant change or addition to the site. This lets people know what's happening on the siteit's another form of a "what's new" page. Add entries referring to news items related to your site's topic, things that otherwise wouldn't make it onto your site. It's another way to add content to your site (and don't forget to show ads!).

Search for other blogs that are related to your site and look for opportunities to comment on other people's blog entries. Do this only when you have something interesting or substantial to say; otherwise you'll be accused of comment spammaking spurious comments simply to promote your own siteand banned from making further comments.

Cross-Promote Your Sites

Once you have two or more sites going, be sure to cross-promote them by having them link to each other. You could do this on the about pages or by including them in the footers of certain pages.

Making It Easy to Find Your Site

"That's funny," Stef said, "I would have thought that word of mouth was the most important thing."

"No," Anita said, contradicting her sister, "I think making a site findable is more important. I have bookmarks for the sites I often visit, but there aren't that many of those. Most of the time, I just start the browser and Google for what I want."

"Ah yes," I said, "the newest verb in the English language: 'to Google.' I'm sure Google's lawyers have daily fits over that use of their trademark. But it underscores what Anita just said: People turn to search engines to find the information they want. If your site's not listed in the search engines, or it has a poor ranking, you'll miss out on a lot of traffic."

"Is it easy to get listed?" Claude asked.

"For the most part, yes," I said, "though it may take a while. The harder part is getting a good listing."

"You mean a high ranking?" he said.

"Yes," I explained, "the nearer you are to the top of a search-results page, the more traffic you'll get. A lot of Web site owners spend a lot of time trying to get their sites to rank higher in the listings. And to get their pages associated with the right keywords. They call the whole process search engine optimization, or SEO for short."

"Sounds scary," Anita said.

"Ah, it's just geek talk for getting better page rankings," I said. "The basics are pretty simple, and you've already done some of them: You've chosen good domain names; you've written good page titles and descriptions; you've put up relevant and keyword-rich content. Now it's a matter of spending time to get your sites in the search engines and then to bump up their rankings. Let's see how that's done." And I explained to them what search engine optimization is all about.

Getting Listed

The first step is to get listed in your favorite search engines. There are three ways to do this:

  • Submit your Web address directly to the search engine for free.

  • Get someone already listed to link to your site.

  • Pay to have your site listed on one or more search engines.

Which you do depends entirely on the search engine you're targeting. Obviously, the free option appeals to most people. To submit a site to Google, fill out the simple form at www.google.com/addurl (Figure 9.1). To submit a site to Yahoo!, go to submit.search.yahoo.com/free/request (Figure 9.2)you'll need to register for a Yahoo! account if you don't already have one. To submit to MSN Search, use the form at search.msn.com/docs/submit.aspx (Figure 9.3). Submitting your site to the major search engines only takes a few minutes and is well worth the effort.

Figure 9.1. Submitting a site to Google.


Figure 9.2. Submitting a site to Yahoo!


Figure 9.3. Submitting a site to MSN.


More Site Submissions

For the URL submission forms and guidelines for other sites, see the list of links at www.memwg.com/free-site-submit.


Downsides of Free Site Submission

Don't expect your site to show up immediately in the search engine's listings. It may take weeks before the search engine crawls (that is, inventories the pages of) your site. Or it may refuse your site for various reasons.


Not all search engines let you submit sites for free. Some require either a one-time payment or a subscription in order to list your site. There may be different payment levels available, with the pricier levels guaranteeing more prominent placement of your site in the search engine's results. Some sites, like Yahoo! and MSN, offer both free and paid submission options.

No Paid Submissions for Google

Google does not offer the option to pay to have your site listed in its index. All site submissions are free of charge. Site owners cannot pay to increase their page rankings: Google has always said that sponsored results (AdWords) do not affect how they rank pages relative to one another.


Is it worth paying for getting listed? Not initially. Submit your site to the search engines using their free submission forms as soon as you have a few good pages of content available, and spend your time (and money) working on other aspects of the site. Wait until the site's been running for a while and you've explored other avenues for increasing traffic.

The other way to be listed by a search engine is to get an already indexed site to link to yours. Search engines periodically recrawl the sites in their indexes, looking for new content and new links. If one of these sites links to a page on your site, the crawler will eventually find its way to that page. And if you've followed the linking rules laid out in Chapter 5, the search engine will then be able to find your site's home page and site map, and soon all your pages will find their way into the index.

The trick, of course, is to get a link to your site on someone else's site. If you know someone who already has an indexed site up and running, you can simply ask that person to link to your site. Getting your site mentioned in someone's blog is an easy way to do it if your site has useful information that the blogger thinks would be of interest to his or her readers. Note that the quality of the links to your site is also importantmore on this shortly.

Getting listed in a Web directorylike the original Yahoo! directory (Figure 9.4) or the Google directory (Figure 9.5)is another way to get into search engine indexes. (A directory is something like a phone book for Web sites.) For submissions to the Yahoo! directory, see the links near the bottom of the http://search.yahoo.com/info/submit.html page. The Google directory is actually based on the directory maintained by the Open Directory Project, also known as DMOZ or ODP, a Web-community effort. Getting listed is free, but it's a more involved (and sometimes controversial) processsee http://dmoz.org/add.html for more details.

Figure 9.4. The Yahoo! directory.


Figure 9.5. The Google directory.


Free Listing for Your Site

Purchasers of this book can apply to get their site listed for free on the www.memwg.com Web site if the site was built with the help of this book. See the full list of conditions at www.memwg.com/free-listing.


Determining Your Ranking

Each search engine arranges its search results in some manner. Complicated algorithms are used to determine which Web pages best match a given set of search terms. Search engine staff spend a lot of time tuning the algorithms in order to return the most relevant results possible to all kinds of queries. Even though the search service itself is free, it's all about making money: The better the results, the more the search engine is used; the more the search engine is used, the more money the search engine company makes by selling related services.

You don't just want your site to be listed by a search engine; you want your pages to rank high in the search results. Being ranked in the top ten sites for a given keyword is a surefire way to generate traffic for your site, especially if you can nab the first or second spot on the list. Of course, every other site owner wants the same thing, so you'll face stiff competition to get one of those prized rankings.

The PageRank Formula

The PageRank formula was created by Google founders Larry Page and Sergey Brin while they were Ph.D. students at Stanford University. The relative importance of a particular page is calculated according to the number of other pages that link to it and how important those other pages are themselves. A basic description of the formula is found on the Google Web site at www.google.com/technology, but see the list at www.memwg.com/pagerank for more details about the formula.


How search engines rank individual pages is a matter of great debate among Web site owners. For competitive reasons, search engines rarely disclose more than vague details about their page-ranking algorithms. Even the famous PageRank formulathe one that determines a site's popularity by counting the number of other sites that link to itis just a small (though important) part of Google's ranking algorithm.

PageRank Tools

Firefox and Mozilla users can download an open-source browser extension that displays the current page's PageRank in the browser's status bar. See www.memwg.com/ pagerank for details.


Competition isn't the only reason search engines keep their algorithms proprietary. Once key algorithms like the PageRank formula are generally known, site owners start to adapt their pages specifically for the algorithms in order to favorably skew the search engine results their way. For example, link farmsgroups of Web sites created specifically to increase the number of links to targeted pageswere used early on to bump up Google page rankings. Search engines are constantly monitoring and adjusting their search algorithms in order to avoid this kind of overt manipulation.

The simplest way to determine a page's ranking is to search using page-related keywords and see where the page ends up in the search results. Since your site is keyword-driven itself (to display more relevant ads), this should yield fairly accurate results.

Another way to determine page ranking is to use Google's Toolbar (Figure 9.6). The Toolbar, currently available only for Internet Explorer, can display a page's relative PageRank on a scale from 0 to 10, with 10 being the most important and 0 the least. The higher the PageRank, the higher your page's ranking within a search.

Figure 9.6. Determining PageRank with the Google Toolbar.


Improving Your Ranking

As long as you're not doing it deceptively or fraudulently, there's nothing wrong with trying to improve your site's search engine rankings. This is what search engine optimization (SEO) is all about.

Do You Crawl Here Often?

Improving your site's search engine rankings is a slow process because it depends on how often search engines crawl your site, and that may happen as seldom as every few weeksthere's no set schedule.


There are two basic techniques for improving a page's ranking. The first is to ensure that the page has good content and good keyword density. This should be a no-braineryou should already be creating your pages this way if you want AdSense to display relevant ads. Watch for missing keywords, thoughtry to figure out what people are really searching for and make sure your page gets included in the search results.

The other technique is to get highly ranked pages to link to your page. This increases the relative importance of your own page, especially if the anchor text of the link (the text that the user clicks to activate the link) contains keywords relevant to your site. While this technique works especially well with Google, where the popularity of a page is a fundamental part of the PageRank formula, all search engines use incoming links as an important ranking tool. Note that the reverse can also be true: Incoming links from poorly ranked pagesespecially those that have been removed from search engine indexes due to overt attempts at page-rank manipulationwill drag down the page's ranking.

As you might imagine, obtaining high-quality incoming links to your site can be a challenge. You can try to initiate a link swap with the other site, whereby you both agree to link to each other's sitesthe classic "you scratch my back and I'll scratch yours" situation. But link swaps only work if both parties feel they have something to gain from the relationship.

Of course, if you have unique, useful content, other sites will start linking to yours without any prompting on your part. This can be a mixed blessing, however, because you have no control over the quality of those incoming links.

Making Money from Your Site

> Eric: Stef, are you still making money?


> Stef: Yes, though not a lot more than before.


> Claude: Well, I'm still not making any money and I don't think
Anita is, either. It's disappointing.


> Eric: It's also pretty normal, Claude. You need to get traffic
for your site. Remember, it's a numbers gamemore traf-
fic means more clicks.


> Claude: All right, then, what do I dosorry, what do we doto
get more traffic?


> Eric: There's no magic bullet, but there are three basic
approaches: Make it easy to find your site, spread the
word about your site, andthis one will surprise you
advertise your site.

We met again a couple of weeks later, this time back at my house. Claude and Anita were publishing ads on their sites now, and Stef had done some tweaking of her AdSense code.

"I replaced the four-ad tower with a two-ad tower and an ad links unit," Stef was telling me as we sat down, "so now the ads take up a bit less space. Sometimes my blog entries are pretty short, and I didn't like the way the taller ads looked in that case."

"Are you still making money?" I asked her.

"Yes," she said, "though not a lot more than before."

"Well, I'm still not making any money," Claude said, "and I don't think Anita is, either." Anita shook her head. "It's disappointing."

"It's also pretty normal, Claude," I said. "How many page impressions per day are you seeing in the AdSense console?"

"I don't remember exactly, maybe 50 on average," Claude answered.

"Less than that for me," Anita said.

"And I bet some, if not all, of those impressions are from you visiting your own sites," I said. "That's the problemyou need to get traffic for your site. Remember, it's a numbers gamemore traffic means more clicks. If your clickthrough rate is going to average 2 percent, for example, that means that you need at least 50 impressions to get one click."

"But I have 50 impressions a day," Claude protested.

"He means 50 impressions from other people, Dad," Stef explained.

"Stef's right, Claude," I continued, "you can't click ads on your own site, so your impressions are effectively meaningless. There's no way to distinguish your impressions from anyone else's in the AdSense console, but you need to account for them when viewing the reports. Anyhow, if you get enough traffic this isn't a problemyour own impressions won't make a big difference in the clickthrough rate."

"All right, then," he said, "what do I dosorry, what do we doto get more traffic?"

"There's no magic bullet," I said, "but there are three basic approaches: Make it easy to find your site, spread the word about your site, andthis one will surprise youadvertise your site."

"Advertise?" Anita asked. "You mean buying ads? I thought we were showing ads."

"You are," I said, "but sometimes it pays to advertise, so to speak. We'll get to that later, but let's start with the most important approach: making it easy to find your site."

Putting It into Practice

Well, I can't wait to put all this into practice!" said Claude. He did seem pretty excited. "I should be able to get ads up on my pages in no time. I think I'll go for the standard vertical ones-I left some room for those already. But those ad links also look interesting. Maybe I'll throw them into a corner of the page…."

"I'm not sure I'm going to do anything different from what I'm already doing," said Stef. "Except maybe put in some channels-it'd be nice to know which of my pages are making me money. I have such a variety of topics in my blog. Do channels work with blogs, too?"

"Sure, URL channels can work quite well," I said. "It really depends on how your blogging software stores the entries. Just remember to define the channels based on the permanent pages-the permalink ones-and not the blog's main page."

I looked at my watch. "Look how late it is again!" I said. "I think we should wrap it up for now, but we need at least one more session to address Stef's concern about your site, Claude-getting it to show up in the index. And consequently getting some traffic to the site. It's a bit of a black art, but it's an interesting topic."

Tips and Tricks

Stef looked closely at the search-results page. "But it says that the search didn't match any documents," Stef asked. "Why not? Every page on his site should match that search phrase-it's a site about voice-over-IP, after all."

"That's because his site's not in Google's search index yet," I said. "We'll have to fix that, but let's leave that for our next session. Instead, I'd like to give you some tips and tricks about using AdSense on your Web pages."

Only Put Ads on Finished Pages

AdSense is notified whenever AdSense code runs on a page. If AdSense has never seen a page before, it dispatches the AdSense Web crawler to fetch and analyze the page's content. If the page is unfinished, the crawler may not accurately determine the page's topic, though it can infer things based on its analysis of other pages on the same site. Worse still, if the page is full of dummy or otherwise off-topic content, the crawler may get the topic completely wrong.

The moral of this story? Don't put ads on unfinished pages.

Rename Pages to Solve Ad Problems

What if you have a page and the ads aren't relevant because you had poor or empty content on the page when the crawler first came along? While the initial crawling occurs pretty quickly, it may be days or weeks before the AdSense crawler revisits a page and notices that the content is different. In the meantime, you're stuck with irrelevant ads.

The solution is to move the content to another Web page entirely. Make sure the new page is named properly and that its content is correct. Keep the old page around, but have it redirect browsers to the new page. A redirect tells the browser that the page has "moved" to a new Web address. Here's a very simple Web page that redirects the browser to another page:

This page has moved



This page has moved to newpage.html.

The redirection is actually done by the meta tag. The body of the HTML page is there in case the user's browser doesn't automatically follow redirects and has a direct link to the new page as well.

Redirection can also be done automatically by the Web server. Talk to your hosting service provider about how to do this.

Move Ads Above the Fold

Ads that are not shown "above the fold" (in the top part of the page) won't be seen by visitors unless and until they scroll the page. Placing a single ad unit at the bottom of the page will not generate much revenue. Unless you're using multiple ad units, keep the ads above the fold as much as possible.

Avoid Empty Ad Units

When using multiple ad units on a page, be sure to specify alternate ads or colors for the second and/or third units. The less popular topics don't always have enough ads available to fill two or three units. An empty ad unit is worse than a partially filled one, so always specify a background color or an alternate ad to display in its place. This is a good strategy with all your ad units, in fact, even if they're the only ones on the page.

Don't Use Too Many Ads

The presence of too many ads on a page detracts from the page content and may cause visitors to ignore the page entirely, especially if they're looking for objective sources of information. This is particularly a problem if the page is being forced out of its natural shape in order to display as many ads as possible.

Ad Unit Order Matters

The order in which ad units are declared in the underlying HTML determines the order that AdSense uses to fill them. The primary ad unit is the first one declared in your HTML. You want it to be located in the most effective spot on your page, because it's the one that AdSense always fills first and that you expect to always show at least one ad. If you're not careful, the primary ad unit might end up in an ineffective position on your page.

The position of a text ad depends on how much the advertiser is willing to pay when someone clicks it. The ads in the first ad unit-the topmost ads in towers and rectangles and the leftmost ads in banners-pay you more than the other ads, and those in the last ad unit (at the bottom or the extreme right) pay the least.

Use Channels to Track Performance

Channels allow you to see which pages are generating revenue and which aren't. For a small site of less than 100 pages, you can use individual channels (URL channels are simplest) to track performance at the page level. Beyond that, you'll need to group pages together for tracking, probably using custom channels. Once you know which pages are working best, try to figure out why they are and how you can extend that success to other pages.

Don't Put Ads on Private Pages

You can easily create private Web pages on your site that are accessible only by password. There's no point in putting ads on private pages, because the AdSense crawler can read only public pages that anyone can access.

Adding Search Code

"Speaking of search," Stef said, "how do you add a Google search box to a page?"

"It's just as easy as adding the ads," I said. "You go to the Search Settings tab and then the Search code page." I logged back into the AdSense console and went to the Search code page (Figure 8.33). "As you can see, it's similar to the Ad layout code page we just saw."

Figure 8.33. Part of the Search code page.


"There seem to be more options," Stef said.

"There are," I agreed, "because the search box must be customized for your site. You have to tell it what language to use for searching and which Google search engine to use, among other things."

"I thought there was only one Google search engine?" Claude asked.

¿Se habla Google?

Search specific languages and countries in Google from www.google.com/language_tools.


"Google actually runs country-specific search sites like www.google.ca or www.google.fr," I explained. "The search engine technology is the same, but the country-specific search sites rank sites differently."

"The 'Select a search box' section looks pretty complicated," Anita suggested.

"It's not that bad," I assured her. "Basically, you're telling Google how the search box should look and what domains it should search. Besides doing a general Web search, the search box can restrict itself to searching just your own site." I clicked on the Google SiteSearch radio button (Figure 8.34). "See how you can enter a domain name? Let's create a search box to search Claude's site."

Figure 8.34. Creating a site-specific search box.


"All we do now is select a style palette for the results window," I continued. "Basically, this controls the look of the search-results window-the window you get after clicking the search box's Search button. You can tailor the window to match your own site's color scheme and even include a logo. You use the Styles page to manage the style palettes, but we'll just use one of the predefined ones for this example. There. Now you do just like before with the ads-you select the code at the bottom, copy it to the clipboard, and paste it into a Web page."

After copying the code, I used Nvu to create a new page and pasted the code into the page body. After publishing the page to Claude's site, I loaded it into the browser (Figure 8.35).

Figure 8.35. The finished search box.


"There's the search box," I said. "It works immediately." I typed the phrase "voip" into the box and clicked the Search button. A search-results page was displayed (Figure 8.36).

Figure 8.36. The search-results page.


"So I'll make money if someone clicks on those ads?" Claude asked.

"Just like you would with ads on your site, yes," I said. "And the same warning applies: Don't click the ads yourself!"

Placing the Ads

"Wow," said Anita, "there are a lot of ad formats to choose from. I count, what, eleven of them?"

"So far, yes," I said. "When I first started using AdSense, there were only four. And the ad links are much more recent additions. Definitely lots to choose from."

"Do they all get used?" Stef asked. "All the blogs I've seen with ads put them on the side, like I did."

"I think they all get used, yes," I answered, "but I think certain formats are much more popular than others. Certainly the tower formats-especially the original skyscraper layout-are popular. They fit naturally on the left or right side of a page. Of course, the banners work well at the top or bottom of the page, in the header or footer."

"The button format would work well in a corner," Anita said.

"And the others can be inserted right into the middle of your content," I said.

"Is that a good idea?" Claude asked. "Doesn't it interfere with the flow of the text?"

"I see it all the time on some sites," Anita said. "Not necessarily AdSense ads, but other kinds of ads. Sometimes they do interfere."

"You have to strike a balance," I said. "You want the ads noticed, otherwise nobody will click on them. That's why many sites use contrasting colors for the ads. But if you have a page full of ads and very little content, your visitors won't be happy and they're just as likely to leave by hitting the browser's Back button."

"How many ads should you place on the page, then?" Anita asked.

"I know!" Claude said. "Put them in the header and the footer and on each side. That won't interfere with the reading."

"You can't, Claude," I told him, "because Google limits you to using no more than three ad or ad links units per page. You also can't place ads on certain pages, like pages that have no real content. Error pages, such as the 'page not found' errors you get when you mistype a page address, have no real content, for example."

"I think a page surrounded by ads would be ugly anyhow, Dad," Anita said. "And there'd be no room for anything else!"

"All right, but how do you put multiple units on a single page?" Claude asked.

"You just copy the generated code into two or three different spots on the page," I said. "It's not a big deal."

"Can we see sample ad placements?" Anita asked.

"Yes," I said, "there are two ways to do that. Google has some samples up on its site, available from www.google.com/adsense/adformats. However, if you want to see actual examples on real Web sites, there's a trick you can do with Google." I pointed to the generated code in the browser window. "If you look in the generated code, you'll see a line that starts with 'google_ad_format,' followed by a value in quotes. That's the internal name that AdSense uses for the ad format you've chosen. Just search for that string using Google and you'll get a list of sites that are displaying those kinds of ads."

"Ah! That's because the code is in the Web pages and Google indexes them, too!" Stef said.

"Right," I agreed. "And if you ever find a site that looks really good and you want to see how they're doing it, use the View source or Page source option on your browser to see the raw HTML for the page." I browsed to my personal site and showed them the source HTML of the home page (Figure 8.32).

Figure 8.32. Viewing the HTML of a Web page from within the browser.

Tweaking the Code

After the break, I took control of the computer. "As you just saw, publishing ads on your site is actually very simple," I began. "And the basics never change: Set the options you want, copy the generated code to the clipboard, paste the code into your Web pages. All we're going to do now is tweak the code."

"What do you mean?" Claude asked.

"I mean, I'm going to change some of the options on the Ad layout code page," I said, "and see how it affects the code and the ads that are displayed."

"So every time you want to make a change," Anita asked, "you have to go and repaste the code into all your pages?"

"Yes," I admitted, "unless your Web server supports some kind of template feature the way blogs do. This is usually called server-side includes, and it lets you place the AdSense code in a separate file and have it included automatically in all your Web pages."

"Like the style sheet," Stef said.

"Yes, the same idea," I agreed. "But how it's done really depends on what Web server you're using-you need to talk to your hosting service provider to get the details. The end result is the same, but whenever you want to update the AdSense code, you just change one file on your site instead of changing each Web page."

"So let's see you do some tweaking," Claude said.

"OK, we'll go through each section of the Ad layout code page, starting at the top."

Ad Type

You specify what kind of ad you want to use with the Ad type section (Figure 8.12). There are two basic types of ads to choose:

  • Ad units, for conventional text or image ads

  • Ad links units, for links to a page of text ads

Figure 8.12. Selecting the ad type.


The standard ad unit can display either text or image ads or both (though images can be displayed only in certain ad formats), so you must indicate which kinds of ads to display.

If you're using an ad link unit, select how many links you want displayed in each unit.

Ad Layout

The Ad layout section selects the ad format (Figure 8.13). The available formats vary depending on the ad type. Standard ad units support the formats pictured in Figures 8.14 to 8.24.

Figure 8.13. Selecting the ad format.


Figure 8.14. The leaderboard (728 x 90) format.


Figure 8.24. The large rectangle (336 x 280) format.


Figure 8.15. The banner (468 x 60) format.


Figure 8.16. The half banner (234 x 60) format.


Figure 8.17. The button (125 x 125) format.


Figure 8.18. The skyscraper (120 x 600) format.


Figure 8.19. The wide skyscraper (160 x 600) format.


Figure 8.20. The vertical banner (120 x 240) format.


Figure 8.21. The small rectangle (180 x 150) format.


New Ad Formats

New ad formats are added from time to time, so check www.memwg.com/ad-formats for updates.


Figure 8.22. The square (250 x 250) format.


Figure 8.23. The medium rectangle (300 x 250) format.


As you can see, there's a wide variety of ad unit formats to choose from.

Ad links units support four formats: 120 x 90, 160 x 90, 180 x 90, and 200 x 90. A four-line 120 x 90 format is shown in Figure 8.25, and the same size but with five lines is shown in Figure 8.26.

Figure 8.25. A four-line ad links unit.


Figure 8.26. A five-line ad links unit.


Color Palette

The Color palettes section selects the colors used by the text ads from a set of predefined and custom color schemes (Figure 8.27). All palette management (creating, editing, or deleting custom palettes) is done from the Ad colors page.

Figure 8.27. Selecting the color palette.


Alternate Ad

If you want to avoid displaying PSAs (public service ads), you can use the Alternate ad URL or color section to specify an alternate ad, image, or color (Figure 8.28) which will take their place on the page. For ads or images, enter the Web address and click the Update code button. For example, if Claude were using a banner (468 x 60) format he could avoid PSAs by creating an identically sized image for his Web site and setting the alternate ad URL as follows:

http://www.voip-at-home.com/images/alternate_ad_468_60.gif

Figure 8.28. Specifying an alternate ad.


Alternate Ads

For more advanced alternate ad and PSA-avoidance techniques, see www.memwg.com/alternate-ads.


Whenever a PSA would otherwise be displayed, the AdSense code would simply display this image. You can even embed small Web pages with links and images or display ads from another (non- competing) ad service.

If you don't have an alternate ad or image, you can still avoid PSAs by clicking the "Choose a color" link and selecting an appropriate background color from the resulting pop-up window (Figure 8.29). Don't forget to click the Update code button after dismissing the pop-up window. The AdSense code is updated to fill the area of the ad unit with the background color you chose whenever PSAs would otherwise be displayed.

Figure 8.29. Choosing an alternate color.


Channel

More on Frames

Frames aren't used much these days, having been largely replaced by CSS and SSI, so for more information see www.memwg.com/frames.


The Channel section assigns a custom channel to the AdSense code (Figure 8.30). All pages that include the code will have their impressions and clicks recorded under the selected channel.

Figure 8.30. Selecting a custom channel.


Note that this section of the layout code page deals only with custom channels, since URL channels are defined without changing the AdSense code.

Framing

Finally, the Framed pages section (Figure 8.31) tells AdSense that you're using frames. This is an advanced way to split a Web page into multiple parts (the frames), each of which displays another Web page. If frames are used, the AdSense code needs to change slightly to find the correct content; hence the need for this section.

Figure 8.31. Specifying that frames are used.


The Code

The Your AdSense code section is where the management console places the generated AdSense code. Don't modify this code; Google checks sites at random to see if the generated code is intact. Once you're done tweaking the options, copy the code to the clipboard and paste it into your Web pages.

The code isn't stored anywhere in the console or on Google's pages (although it is stored on your own pages once you've pasted it in). If you close the console page and you need to regenerate the code at a future point (for instance, if you want to change your ad layout), you'll have to reset all the code layout options. It would be prudent to write down important settings for the future.

Adding the Code

It really wasn't a big deal to do," Stef said. "Blogger's instructions were easy to follow. First you log in to your AdSense account and go to the Ad layout code page." Since we were still logged in to my account, Stef merely clicked on the Ad Settings tab to bring up the Ad layout code page (Figure 8.1). "As you can see, this is a long page with many options. The options don't all fit in the window-you have to scroll down to see them, like this." Stef revealed the rest of the page (Figure 8.2).

Figure 8.1. The top of the Ad layout code page.


Figure 8.2. The bottom of the Ad layout code page.


"It looks a bit intimidating when you see it all," Anita said.

Ad Pixels

The dimensions of the ads refer to the ad's width and height in pixels. Many Web pages are designed to be 800 pixels wide by 600 pixels high, so a 120-by-600 vertical banner runs the whole height of a typical site.


"I thought so, too," Stef continued, "but it's not that bad. All you really have to do to get started is choose the ad format-what they call an ad layout-and a color scheme-which they call a color palette. I chose one of the skyscraper layouts because I was putting the ads in the blog sidebar. So let's do that now, too." Stef chose the 120 x 600 Skyscraper format from the drop-down list of ad layouts (Figure 8.3).

Figure 8.3. Choosing an ad layout.


"The 120 by 600 refers to the size of the ads?" Anita asked.

"Yes, the width and the height of the entire ad block, in that order," Stef answered. "You have to choose the format that fits your page layout, of course. Then I chose the color scheme, one that looked good with my blog's color scheme. I wasn't sure if I should make the ads stand out or not, so I chose something complementary."

"Let's pretend you're working with a light blue background for this, Stef," I said. "What scheme would you choose?"

Stef scrolled through the list of colors. "Hmm…if I wanted the ads to blend in, I could choose this one," she said, selecting Melancholy Blue from the list (Figure 8.4).

Figure 8.4. Choosing a color palette.


"Hey, the sample ad changed colors!" Claude noticed.

"Or I could choose one that really contrasts with the background," Stef continued, clicking on each color palette in the list. "Looks like I'll have to create my own color scheme," she said as she clicked the "Manage color palettes" link. "You do that on the Ad colors page." Stef had temporarily left the Ad layout page in order to create her new color scheme (Figure 8.5). "I had to create my own palette because I didn't really like Google's color schemes."

Figure 8.5. Creating a custom color palette.


"They're not very bold for the most part," I agreed.

"And I can be pretty bold sometimes," Stef continued. "So let's create a bright yellow ad with a nice black border….There we go! I'll call it Startling Yellow and save it." Stef clicked the button marked "Save and get code," which returned her to the Ad layout code page. "Now I choose my new custom palette and scroll to the bottom of the page. There's the code to display the ads." Stef clicked in the box labeled "Your AdSense code" to automatically select the code (Figure 8.6).

Figure 8.6. Selecting and copying the AdSense code to the clipboard.


After copying the code to the clipboard, Stef turned to me. "Do you want me to go to Blogger and show how to add the code to a blog?" she asked.

"No, let's just use a simple Web page," I said. "Start up Nvu and create a page with a light blue background and some text."

"OK," she said, quickly creating a new page called simple.html (Figure 8.7). "So I guess now I can paste the code…oops, that doesn't seem to work!" The code was now showing on the page (Figure 8.8). "Better undo that…."

Figure 8.7. Creating a simple page.


Figure 8.8. The wrong place to paste the code.


"Switch to the Source view and paste the code there," I suggested.

"Right!" Stef exclaimed. "That makes sense-that's what I did with my blog. I had to go paste the code between the body tags. I'll add the code to the end of the body." Switching to the Source view, she repasted the code (Figure 8.9).

Figure 8.9. Pasting the code into the Source view.


"There!" she said. "Now let's preview the page…. Nothing! Where are the ads? The ads on my blog showed up right away!"

"That's because Nvu skips over the JavaScript code," I explained. "Save the file and hit the Browse button instead." She did, and a new browser window opened (Figure 8.10).

Figure 8.10. Testing the ad code.


"There they are!" said Anita excitedly.

"AdSense is showing an ad for voice-over-IP," Claude said. "How did it figure that out?"

"The code looks at the page's address and sends it along to Google's servers," I said. "Stef saved the file in the same folder we used before: VoIP-at-home. Look at the address bar in the browser."

JavaScript

The JavaScript programming language was designed for adding advanced features, such as interactive games, to Web sites. JSMadeEasy.com (www.jsmadeeasy.com/) is a good source for basic JavaScript tutorials and ready-made scripts. See also the list at www.memwg.com/javascript/.


"And that's how it matched a VoIP ad to the page-clever!" said Claude.

"But most of the time you're not going to see any ads until you place the page up on your Web server," I continued. "Or you may see PSAs."

"What are those again?" Claude asked.

"Public service announcements-ads for charitable causes," I answered. "But you can disable those if you want from the code layout page."

"That page doesn't look very good," Stef said. "I should have used a banner ad instead."

"Oh, I know how to fix that," said Anita. "Can I have the keyboard, Stef? Thanks." Typing quickly, she inserted a table definition right into the HTML code.

"I see you've been practicing!" I said.

"You wouldn't believe how much time I've spent trying to get the layout of my site just right," Anita said. "I learned a few things doing it. This may not be the best way to do it, but if you use a single-row table and place the content in the left cell and the ads in the right cell, you get a two-column effect like this." She saved her changes and reloaded the page (Figure 8.11).

Figure 8.11. Changing the page layout.


Using Tables

An interesting discussion of when and why to use tables, even in a CSS page, can be found at www.memwg.com/using-tables/.


"Oh, I believe you," I told her. "A good layout can be hard to do. I've often resorted to tables myself. Purists don't like it, but you want your site to look good. Although I must point out that you can do the column effect you want with style sheets. In any case, once the code's pasted into the page, you just place the modified page up on your Web site and load it once into your browser. Shortly after, AdSense will crawl the page to analyze its content-if you don't see relevant ads right away, you'll see them within an hour or so."

"It was very cool," Stef said. "And I had to stop myself from clicking some of the ads."

"That's right, and it bears repeating: Don't click the ads on your site no matter what," I said. "Otherwise, Google may think you're performing click fraud and they could kick you out of the program."

SSI

Server Side Includes (SSI) techniques are covered in more detail at www.memwg.com/server-side-includes.


I stood up. "OK, let's take a quick break," I said, "and then we'll look at the Ad layout code page in more detail."