With building the WikiMatrix site we entered a completly new terrain: generating revenue through online ads. It's not our major business and we barely make enough money to cover the hosting costs, but it's better than nothing.
We started with Google Adsense links but soon thought about selling additional adviews our self.
Instead of reinventing the wheel with implementing a banner rotation, I looked for a nice Open Source solution and found it in phpAdsNew. To quote their Website:
phpAdsNew is an open-source ad server, with an integrated banner management interface and tracking system for gathering statistics. With phpAdsNew you can easily rotate paid banners and your own in-house advertisements. You can even integrate banners from third party advertising companies.
However we had some special requirements which's solutions took me a while to figure out.
This aproach works nice if you have a few static zones (eg. one banner at the top of each page). But what if you want to control which banners are placed on a special page dependent on very dynamic factors?
Let's have an example: We want to offer our DokuWiki Business support to people looking for anything DokuWiki related on WikiMatrix. For example our banner should be shown on any comparisons in which DokuWiki is involved. The one zone fit's it all aproach doesn't work in this case.
I first had a look at the keyword support of phpAdsNew. It allows you to assign keywords on banners and then pull a banner matching certain keywords through some scripting in your Webpage. This was nearly what I wanted but the syntax used to specify the keywords isn't very flexible - I also thought that the keywords feature is implemented the wrong way around: I only can give banners a keyword and select it from the website. But I wanted to assign keywords to the website and add my banner to certain keywords.
I now use the keyword support only as a simple zone replacement. Our top banner “zone” just pulls all banners having the keyword “wikimatrixtop”. I could have used zones but I'm used to keyword matching and found it more intuitive this way.
But what about the restrictions I wanted? The optional source parameter was the final solution. You can use a custom string in your banner invocation code in the website. In your banner configuration you then can define delivery restrictions based on this source parameter using simple wildcards.
For example the comparison page between Instiki and DokuWiki sets a source parameter of 'compare-instiki-dokuwiki'. In the configuration of a DokuWiki related banner I can now just set '*-dokuwiki*' as source restriction.
PS: If you want to advertise on WikiMatrix just contact us.