Working with Harlan Ad Server in Gestalt
From Gestaltipedia
Harlan [1] is collection of web application tools that adds traditional widget-style ad banners to a ColdFusion-based web site. The Harlan tools generate blocks of JavaScript code that can be inserted onto any HTML page, causing a single ad banner or rotating campaign of banners to be shown. The Harlan system also collects basic statistics for ad impressions and click-throughs.
The system is free software, given to the open source ColdFusion community by Raymond Camden [2] under the Apache 2 license. It is adapted to run in Gestalt as a drop-in module and has had some modifications made so it is able to be integrated into the main web site's data environment and administrative tools.
For basic information about how to use Harlan's core features, visit the main Harlan Project site at http://harlan.riaforge.org/[3].
Contents |
Setting up Harlan on an instance of G2
Here we will talk about how to set up the data source for Harlan and configure the administration tool.
How to put ads into the public site
Once you have Harlan running, you can insert an ad in any web site by simply pasting widget code for the appropriate ad or campaign into the body of any page in the site. In fact, any web site on the internet can have code pasted from the same Harlan server. However, for this document, we'll focus specifically on your single Gestalt 2 web site.
Widget code on Gestalt sites cannot simply be pasted into a text element, due to restrictions on security and requirements of the code in a widget block to conform to certain specifications which are not honored by the basic text element editor. Instead, we have to use a custom tag element to call a special tool that will preserve the widget code and display it in the right way, so the audience's web browsers will interpret it properly.
Adding banners and campaigns on any page essentially comes down to the same process. The only difference is where the widget code is copied from.
For more information on setting up default ad banners, see Managing Harlan banner blocks in page templates
Inserting Campaigns
Campaigns are collections of ads which are to be rotated according weight ratios. To add one to a page:
- Go to the Harlan ad server control panel, and click on "Campaigns"
- Find the campaign you'd like to show on the site. Under the campaign's name, in light gray text, will be a box containing the widget code to show that campaign. Highlight the text and copy it to your clipboard.
- Go to the public web site and navigate to the page you'd like to place an ad on.
- Edit the page, and add a "Custom Tag" element to the page's contents.
- Set the custom tag to run as a "Code Block Output Module" that will be compiled into the page.
- Update the custom tag; after it reloads, a text box should appear to paste the widget code into.
- Paste in the widget code and update the element again.
- Go back to viewing the entire article and position the new "customtag" element in the preferred order of elements on the page.
- Republish the page. Done!
Inserting Single Ads
Ads are single banners which can be bundled into campaigns or displayed on their own. They are also represented by widget code. To insert a single ad:
- Go to the Harlan ad server control panel, and click on "Ads"
- Find the ad you'd like to show on the site. Under the ad's name, in light gray text, will be a box containing the widget code to show that ad. Highlight the text and copy it to your clipboard.
- Follow the instructions for inserting campaigns, starting with step 3.
