APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > Websites, Blogging > Ad jealousy
Printer Friendly Version




Ad jealousy


I run ads here. I know some people hate advertising, but the money has to come from somewhere. Writing articles and maintaining pages takes a significant amount of time, so advertising is a necessity.

But running the ads has become complicated. As the site has grown, I have more choices of ads to run. There's Google, YPN, Chitika, and I have direct ads too: ads that individual companies have paid for.

There are rules.

Google won't let you run certain types of ads more than once per page. Google won't let you run any other contextual ads on the same page as theirs, or any ads that just look like their ads. Google doesn't let you run ads on certain kinds of pages (search results, newsgroup postings). YPN has similar rules, and so does everyone else. Because I generate ads dynamically rather than hard-coding them into the page, I ended up with a very complicated piece of code to avoid breaking any rules.












There's another problem. I both need and want to control ratios. For example, I might want to give YPN 25% of the pages, but always give page xyz to direct adveriser z. That gets very complicated.

It's time for a rewrite. I've been thinking about how to handle all this, and thought that the easiest way is probably a little database that specifies what ads a page can run. That translates into a fair amount of storage just because of the sheer volume of pages here, and I'd like to avoid that for performance reasons, so my next thought was to generate a hash of the page URL and pick the ad type from that. But then that means that page X always gets ad type X, and that's not good. So I had a better idea: hash the URL, but then look that hash up in a small database that has the ad type to run. That little database can be randomly changed on a daily basis, allowing me to control ratios of ads types to run easily.

So, yet another project. Good thing I don't sleep much.


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

2 comments




More Articles by Anthony Lawrence - Find me on Google+



Click here to add your comments





Sun Nov 13 13:16:46 2005:   MikeHostetler


How about using "tags" on your pages and, based on the tags, you could have a database stored with all the types of ads for each tag name.

If Technorati could use tags, why can't you?

That said, the ad thing seems very complicated. It seems that you just need to write your own state machine to get it right -- that is never fun.



Sun Nov 13 13:25:32 2005:   TonyLawrence

gravatar
I avoid doing anything that would require me to go back and modify thousands of pages individually. The hash actually eliminates the need for a state machine and is working well already.

By the way, Jim Mohr pointed out that Google has once again loosened up on some of its policies and it is now apparently OK to use Google on pages they formerly didn't like. I guess the competition is affecting them.

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




 I sell and support
 Kerio Mail server
pavatar.jpg

This post tagged:

       - Advertising
       - Web/HTML




Unix/Linux Consultants

Skills Tests

Guest Post Here