Easy Web Ad Management
Volume Number: 15
Issue Number: 7
Column Tag: Web Development
Easy Advertising Management
By Kelly Konechny
Edited by John O'Fallon, Maxum Development
How to build an ad management system using
NetForms and NetCloak
Tracking Ads, Views and Click-Thrus Automatically
Managing advertisements on a Web site can be a job in itself for Webmasters.
Generating regular reports for sales staff of views, click-thrus, where an ad resides
on the site, and the length of time that they are scheduled to be there can swallow up
your time. Building an advertisement management system can help a Webmaster juggle
ads and save vast amounts of time that would normally be spent on formatting reports
and distributing them to the appropriate people. Using NetCloak Professional from the
folks at Maxum, you can develop an advertising management system to help you better
track ads and save some time.
In the examples below I presume you are operating a Mac webserver running Maxum's
http://www.maxum.com/ NetCloak and NetForms, or the product combining the
functions of both, NetCloak Professional. Before building the system consider a few
things about your Web site. Take account of all advertisers, their specific ads, and the
ad's placement on your Web site (if you haven't done so already). This information
will always be useful, and it should be incorporated into your ad management system.
Counting an ad that is viewed
Start by making a list of pages on the site that contain ads. This will not only help you
in this project but will prove handy for future reference as well. You will need to
place a counter on all pages that contain ads in order to count views of the ad. Counters
can be reset or set to an initial value if you wish using NetCloak's "List Management
window.
Figure 1. The Edit Lists dialog allows you to control all your counters from one
Under NetCloak's Configuration menu choose Edit Lists (Figure 1). This is where you
will maintain all of your counters. You can click on a counter name to see the current
value, and even change or remove the counter entirely.
On each page that will include an ad banner, place a counter in between the and
tags of your HTML. The text for the counter will look like this:
The counter should be placed in your HTML like this:
Sample page with counter
Main Page
Give each page its own counter and unique counter name. The counter name is the only
way that NetCloak Professional identifies individual counters. If you happen to have
two counters with the same name you may be tracking numbers incorrectly, so be sure
that each counter name is unique.
Redirecting helps track clicks
In order to track views and click-thrus, two counters are needed: one for the page on
which the ad is located, and one for the ad itself to track click-thrus. Click-thrus are
difficult to account for because they typically point to another Web site. The way to
account for click-thrus is a bit sneaky. To track a click through we need to count the
clicks on the ad by using a "redirect". Instead of having the ad banner linked to the
advertiser's Web site directly, the ad link is set to a special redirect page that exists
on the local server. This page will never be seen by end users, and is used simply to
count the ad click through and then redirect to the advertiser's Web site. The link for
the ad will look like this:
Link for an ad
The link is specific to your site of course, and the filename "adXredirect.htm" would
be changed to reflect the advertiser, since you may have many different advertisers on
your site. You could create one redirect for all of an advertiser's ads, but that may not
be specific enough since it would only show the total number of times that all of their
ads were viewed and clicked on. You will find that making separate redirects for each
ad will be much more beneficial because it is more specific. Once this is done you are
ready to build your redirect page.
The redirect page consists of only two lines of code. The counter (
clientX_adX_count>) will indicate the total number of clicks on the ad, and the redirect
will take the user to your advertiser's Web site. The redirect page will look like this:
Redirect page
You will need a unique name for each ad's counter so a simple system of naming should
be established. Remember to ensure that all counter names are unique to avoid
confusion when the actual counts are being recorded.
Basically, this redirect page counts the click on the ad with the
clientX_adX_count> and then redirects the user to the client's Web site at
http://www.clientswebsite.com. This will happen so quickly that the user will most
likely not even notice that their one click has actually taken them to a hidden page
before reaching the real destination. You are now tracking click-thrus.
Once this task is completed, you are counting views and click-thrus for every ad on the
site. Depending on the number of ads on the site you may have a lot of redirect files on
your server. It's best to create a folder or directory to store all of the ad tracking
files, just to keep things clean and organized. It will also make updating the files quite
a bit easier. Now you are ready to move to the next part of building the ad management
system: displaying the views, and click-thrus for every ad.
Placing the ad graphic on the page To ensure that the advertisement is being tracked
properly, each of your ad's links needs to be pointed to the redirect page. You will need
to enter in the link to the advertiser's Web site along with the advertiser's graphic.
The code will look like this:
Ad system link and graphic reference
BORDER="0">By doing this, clicking on the ad takes you to the redirect page, which counts your click
and then sends the user off to your advertiser's Web site. You can also modify the code
for the ad and the redirect if your advertiser wishes to rotate between two banners.
This again is done with NetCloak. The trick to doing this is to to use NetCloak's
and tags with the random feature. The code will look like this:
Ad system rotation code