Using Domino Banner Ad
Download Latest Version
Index



Welcome

Thank you for downloading Domino Banner Ad. I hope this will prove to be a useful tool for your web site and Notes databases, and that it may prompt you to design your own innovative Domino agents.

This database is based on the principle that anything other web servers can do, Domino servers can not only do, but do better. Why better? Because they can leverage all their Notes heritage - multiple categorized views, replicated databases, Notes client and web client access etc.

You can achieve, using standard Perl or other cgi-bin tools, superficially identical results to Domino Banner Ad. However, putting an ad on a page, which these tools do easily, is only a small part of why you as a webmaster wish to use ads. Of far more use are the statistics generated behind the scenes - which ads are clicked on most often, which sites are most popular, when is usage heaviest, what is the international spread of usage, what type of browsers are most common - vital to active and progressive webmastering. The simple Perl routines fail at this sort of analytical use.

Domino Banner Ad is currently free for use by the Notes community. Depending on demand, a separate Lite (remaining free) and commercial Professional versions may be released; but regardless, you can continue to use this current database free. If you like it and appreciate it, a small acknowledgement and/or link back to Rhizomatics is appreciated, but not demanded. Ideas for improvements are welcomed, as even are bug reports and complaints!


General Setup

Web Agents

There are two principal web agents used in Domino Banner Ad - (web agents are the native Domino equivalent of servlets):-

For users limited to restricted agent use, e.g. if running on a Domino web-hosted site, there are two matching alternatives - WebAdShowRestrict and WebAdClickRestrict. These have identical parameters and minor limitations - media caching is switched off, and statistics cannot be saved to a separate database.

Important News for Upgraders
Updating an Existing Domino Banner Ad database


1) Refresh Design of your existing database

The database has been specified as a template called DominoBannerAd, so it's an easy matter to replace the design from a Notes client.

2) Copy non-design elements from the new template.

The database also contains non-design elements, such as documents for error images and reports which are not copied by a Notes replace or refresh design.

An agent is incorporated (operated from the Refresh Contents button in the Admin Menu navigator or from the Upgrade Actions submenu) which will copy in all the required documents from a given database.These will overwrite any existing documents with the same key, but will not remove any other documents which you've added. The same Admin Menu also has a button to access the standard database Design Refresh in Notes.

Alternatively, manually copy in your existing Ad and Site documents (and OLAP stats if you use them) from your existing DominoBannerAd database and make the new unzipped database the live one.

3) Resave the Database Settings document

Use the preferences button on the navigator or the Edit Settings agent from the Actions menu.

This step is necessary to set any new default values in the preferences document, but while doing so, it is worth reviewing again the options presented.

4) Perform any version specific upgrades

v1.3 -> v1.4 (or greater)

Ensure that the checkbox displayed below is unchecked for the 'Using Database Document' and 'About Database Document' to ensure that up-to-date copies of the help documents are included in the design refresh.



v1.X->v2 or greater

The security model has been overhauled in v2

Please see the Security Model section below for details.

N.B. You do not need to change anything unless you wish to take advantage of the new model.


Clients and Campaigns

It is not essential, but for multi-client and campaign environments, very useful to register your clients and campaigns on the system before creating ads. Basic statistics can then be monitored both for individual ads and whole campaigns.

Controls over ad impressions - such as start and end date, maximum impressions and clickthrus, site groups and page locations - can all be controlled at the campaign level rather than by individual ads. The campaign values for these controls can be loaded at one touch of a button onto each ad - and a button on the campaign form allows all associated ads to be instantly updated to revised campaign values.

You can use the same campaign name for more than one client, e.g. "Christmas 2000". Banner Ad will update ad settings from campaigns on a strictly per client basis. Even if you do not have clients and campaigns for any or all of your ads, it may still be worthwhile creating a dummy client and campaign, to take advantage of the quick impression control updates campaign control offers.

The Campaign document also displays summary statistics for the campaign - number of ads, total impressions, total click-thrus and click-thru averages. These can also be seen on the Campaigns view, and a button allows all summary statistics in the view to be automatically recalculated. N.B. Campaign statistics do not rely on the Multi-Dimensional or Document Level statistics options - they are computed directly from the impression and click-thru count of each individual ad in the campaign.


Creating an Ad

There are two ways of specifying the ad display - an Object Specification, by attaching a media file (e.g. JPEG or GIF) to the ad, or a Custom HTML Specification with your own custom HTML code. Both methods can be used for a wide variety of media types, such as java applets, JPEG files or Shockwave animations, and the custom HTML can be extended to include Javascript or plain text. However, HTML code can only be used on ads delivered to sites using HTML Delivery (see below) - and will not be displayed on sites using the File Delivery mechanism unless an image is also specified.

File Delivery
HTML Delivery
Custom HTML Specification
X
Object Specification <IMG>
X
X
Object Specification <EMBED>
X
X
Object Specification <APPLET>
X (limited)
X

Give your BannerAd a short reference, of minimum length and ideally without spaces. This will be used internally to refer to the ad and must be unique. You may also give it a long description. The other essential is a destination or redirect page, i.e. the page to which browsers will be redirected when they click on this ad.
Multi Domain Destinations

If your clients wish different destination pages, specific to the browser's network domain, to be redirected on clicking, then use the Domain Destinations button to specify the alternative pages. This means that a Japanese user can be passed onto a local page in her own language, or intranet users handled differently from external internet browsers. The same ad can be used for unlimited destinations, all counted on the same basis.

The domain can be a top level domain, e.g. .uk,.mil,.net, a lower-level domain - such as .co.uk or .com.tw or if you'r Domino server is not using DNS, an full or partial IP address. If you wish to mix top level and low level domains, place the top level domains at the top of the list and the lower level domains at the bottom - Banner Ad will go through every domain and use the last appropriate address found.



Object Specification

First of all create your graphic, ideally as a GIF file (animated or static), but any image type that your target browsers can handle may be sent. There are several standards for banner size on the web, 400x40 being the longest standing. However Domino BannerAd will work with any size of image. Once you have your picture, use the New Ad button, or select Ad from the Create menu.

There are four stages to creating your Ad document:

1. Use the Load Preview button to find the file and show it for reference within the document.
2. Use the Load Media button button to store the advert
3. Select Analyze Media to analyze the file and extract its vital statistics (GIF and BMP only)
4. Select the tag type used to display the file. This can be <IMG>, <EMBED> or <APPLET>, with an overlap for some browsers (e.g. Internet Explorer can handle AVI movies in an IMG tag, and Netscape has Java applets to show automatically show GIF files specified in an <EMBED> tag).

With File Delivery, Banner Ad will not send an ad that can only use an <EMBED> tag to a page that has an <IMG> tag encoded, and vice versa. With HTML delivery, Banner Ad will construct the correct <APPLET>, <EMBED> or <IMG> tag in the dynamically generated HTML. If your embedded media requires additional files, e.g. Java classes, these can be stored in the file system, or more usefully in the Ad Files rich text field.

The actual code required is supplied below in the Creating a Banner Site section. Alternatively, if you create Site accounts for the pages which will have ads on them (recommended if you wish to analyze which pages are most successful at garnering clicks as well as which ads), sample HTML code to place on a web page to display the banner will be displayed on the Site document.

Additional parameters can be specified within the <IMG>, <APPLET> or <EMBED> tag using the options in the HTML Delivery section of the ad form.

Custom HTML Specification

Enter the raw HTML code directly onto the Ad Document, in the HTML Specification part of the form. Banner Ad will automatically frame this code with the correct <A HREF> and </A> tags to make the clickthru link.

This code will then be displayed on sites using the HTML Delivery mechanism. If you wish this ad also to be displayed on sites using File Delivery, then also load an appropriate object specification (i.e. load a GIF file onto the Ad document) as described above.

Placement Control

If you wish to control the placement of the ad, select on the Ad document which page locations it may be placed upon - select one or more of top, bottom, middle and frame, or leave blank to have it placed anywhere. Ads marked for a specific location will always be given preference for displaying on sites at those locations. N.B. For placement control to operate, Site documents must specify where on the page the banner site is located.

To control on which groups of sites this ad may be displayed, choose the groups from the drop-down list. Additionally, if the ad can be shown on a page with no group defined, then add Ungrouped to the list of groups.

N.B. Ensure that there is a Default Ad created in the database - a standard one ships with the database. The presence of this special ad will prevent any page ever failing to find an ad to display, but will not be displayed other than in this situation. The ad status must be set to Default.


Creating a Banner Site

Each banner site has a corresponding document in the Domino Banner Ad database. This document holds all the details of the site, plus the current impression and click-thru counts. A single web page may well have more than one Site account - separate accounts can be created to put different banner ads onto different locations on the same page, and track correctly which ad is processed when the user clicks. For example, a banner ad could be at the top of a large document, another at the bottom and another in a framed side-bar.

Automatic Site Generation

There is no need to manually create this document if you have Allow Automatic Account Creation switched off. If so, Banner Ad will automatically create a new banner site document whenever a new location is first used. If an account name has been specified (recommended) using the &X parameter, this will be used as the site account - otherwise the page URL will be used instead. Automatic generation is particularly useful when dynamic HTML is used (either using DHTML or Notes formula language) to generate the <A HREF> and <IMG> tags on web pages to show banners - e.g. the account code could be created on the fly from a prefix and a key notes field on the Domino form, to uniquely track impressions for that specific page.

Frame Targetting

To control the frame into which the sponsor's (i.e. target page) will be loaded, either code the TARGET parameter onto the <IMG> tag for the ad (when using File Delivery, see below) or if using HTML Delivery, specify the target frame directly on the Site document. Domino Banner Ad will then automatically generate this parameter when it dynamically creates HTML for the ad. If both Site and Ad have target frames set, the Ad target takes precedence.

Limiting Available Sites

Manual maintenance of banner sites is required where placement control is required, or if you do not wish to enable automatic account creation and retain maximum administrative control. If you wish to ensure that all adverts use site account rather than page URLs, switch Enforce Accounts on in the settings document. This will reject all banner ad impressions where a &X parameter is not present to specify the account.


Putting an Ad on a Web Page

N.B. The banner ads may be placed on any HTML page on any server. The BannerAd agent itself must run on a Domino server, but the page being containing the ad may be on an Apache, IIS, Netscape etc. server.

There are two ways of delivering ads to pages: File Delivery and HTML Delivery. The latter is a much more powerful means of controlling ads, with more control and ways to beat caches and proxies. It also performs around 60% faster than file delivery, on both impression and click-thru.
  • File Delivery delivers a single binary file contained as attachments in the Banner Ad database, usually when called as a SRC parameter to a IMG tag.
  • HTML delivery delivers source HTML code required both to display the ad, and create the correct hyperlink to the click-thru event. To do this it uses dynamically generated <IMG>, <APPLET> or <EMBED> tags, or free-form HTML of your own specification. Usually the HTML will be returned to the SRC parameter of a FRAME, LAYER or IFRAME tag, or loaded by JavaScript events on the banner site page.

    N.B. When putting ads onto secure pages, ensure that all calls to Domino Banner Ad agents are also using https protocol rather than http, to avoid browser security warning messages.

    All ads are displayed using a URL which calls the Domino agent WebAdShow. A number of optional parameters can be specified on the end of the URL:-
    HTML Delivery Only
    &SRequest for HTML source to be delivered rather than a binary image, i.e. to switch on HTML Delivery rather than File Delivery
    &RUse on WebAdShow to request a random number to be generated on HTML delivered ads. Used to beat local and proxy caches, to ensure that the latest ad site is always the one returned. The random number will appear as &R=4744829 on the dynamically generated WebAdClick code.
    All Delivery Methods
    &KDo not increment ad display counter or perform any analysis.
    &X=MyAccountSpecify an account name for the advert rather than the referring page address. If omitted, Banner Ad uses the current page URL as the account.
    If "Allow Automatic Account Creation" has been switched off, these must be created beforehand in the database; otherwise they will be initialized on the fly.
    If "Enforce Accounts" is switched on, this parameter is mandatory.
    &ESelect only ads with embedded objects. Use in the SRC parameter of an <EMBED> tag on a web document, or combined with the &S parameter of a HTML delivery request.
    If omitted, an object compatible with the <IMG> tag will be sent on File Delivery ads, and any ad for which HTML can be generated on an HTML Delivery ad.
    &JSelect only Java ads. Use in the CODE parameter of an <APPLET> tag on a web document, or combined with the &S parameter of a HTML delivery request.
    If omitted, an object compatible with the <IMG> tag will be sent on File Delivery ads, and any ad for which HTML can be generated on an HTML Delivery ad.
    &DebugTurn debugging mode on - errors are reported in detail as text, rather than images. Only operational if Allow Debug is switched on in the Settings document.
    For Java ads with internal URL links, clicking on the ad in the Debug page will lead to the WebAdClick debug page. For all other ads, clicking on the ad will have the standard click behaviour, but an additional Debug Ad hyperlink will be provided underneath the ad to debug the click-thru.
    File Delivery

    The ad is placed on a web page using the format:
    <A HREF="<click agent web address>">
    <IMG SRC="<show agent web address>">
    </A>

    or
    <A HREF="<click agent web address>">
    <EMBED SRC="<show agent web address with &E parameter>">
    </A>

    or
    <APPLET CODE="<show agent web address with &J parameter>">

    (N.B. HTML delivery allows a wide variety of extra parameters to be placed on APPLET tags)

    The basic syntax for the Domino Banner Ad address is:-

    http://your.webserver.com/DomBanAd.nsf/WebAdShow?OpenAgent

    (If you have placed DomBanAd.nsf in a subdirectory, adjust this URL accordingly).

    In addition, the <IMG> or <EMBED> tag must be surrounded by a hyperlink definition pointing to the Domino Banner Ad agent which handles clicked ads and forwards the user onto the advertised site (Java applets may process mouse clicks internally).

    <EMBED> Tags

    If using <EMBED> ensure that you supply the &E parameter in the WebAdShow agent URL - Banner Ad will supply ads with <IMG> tag compatible images where the URL does not contain &E and <EMBED> compatible images where it does.

    Java ads

    For Java ads, you must use the &J parameter to ensure that only a Java class will be returned as a file. Note that File Delivery is limited in use with Java to single classes, unless you hold the rest of the code in an external static URL. Also, you may only pass parameters if you have a standard set of parameters for all applets in use, and can pre-code the <PARAM> tags accordingly. HTML delivery is required for the full power of Java applets.


    Example Code

    Including click-thru hyperlink, for delivering an image file:

    <A HREF="http://www.acme.com/DomBanAd.nsf/WebAdClick?OpenAgent&X=HomePage">
    <IMG SRC="http://www.acme.com/DomBanAd.nsf/WebAdShow?OpenAgent&X=HomePage">
    </A>
    Dynamic Ad Generation

    N.B. The code above can be hard-coded onto a web page. Alternatively, the Banner Ad HTML can be generated, whether by Perl, dynamic HTML, or more simply using Notes formula language if being served by a Domino server.

    For example, the code could be included in the design of a Notes form, and the subject (or other field) abbreviated to form an account (&X) code for the ad. Coupled with dynamic account creation, this offers a quick way of creating 100s of banner sites, each individually trackable, from the same form.
    HTML Delivery
    N.B. In order to use HTML delivery, it is essential that the BaseURL setting in the preferences document has been set correctly.

    For example, if your Banner Ad server is called www.rhizomatics.com and the ad database is called DomBanAd.nsf in the web subdirectory, the BaseURL would be http://www.rhizomatics.com/web/DomBanAd.nsf

    With HTML delivery, Banner Ad does not deliver the binary image file in response to a <IMG> tag, but delivers the entire HTML required to display and link the ad, as would be used for file delivery. HTML delivery is much faster and more flexible than file delivery.

    There are three ways to incorporate HTML delivered ads:


    Whichever method used, the Domino Banner Ad agent must be called as the source of the HTML code, and the &S parameter incorporated in the agent URL. Code to do this is generated automatically for you in each banner site document.

    Domino Banner Ad selects the next ad in the rotation and builds a reference to this into the dynamically built click-thru URL using the &A parameter. This means that no impression document need be created by the display agent, nor will the database of impressions have to be searched (and deleted) by the click-thru agent. This leads to at least 60% performance gains, and minimizes the amount of database transactions. This method also handles browsers behind proxy gateways, and guarantees that the ad clicked is always the ad displayed (which typically requires cookies to ensure).

    Frameset Example
    <frameset frameborder="2" framespacing="2" rows="25%,75%">
       <frame scrolling="NO"
       src="http://www.server.com/DomBanAd.nsf/WebAdShow?OpenAgent&S&X=HomePage"
       name="ad" noresize>
       <frame src="http://www.server.com/homepage/" scrolling="YES"
       name="body" align="CENTER">
    </frameset>

    Non-framed example

    This method uses the <IFRAME> tag on MS Internet Explorer (available on v3 upwards), with alternate code (within the <IFRAME> and </IFRAME> tags) for Netscape Navigator - using Netscape's <ILAYER> (or <LAYER>) equivalent to <IFRAME>. This ad code can be placed anywhere in an existing page.
    <! start of embedded ad specficiation >
      <iframe FRAMEBORDER="No"
      src="http://www.server.com/DomBanAd.nsf/WebAdShow?OpenAgent&S&X=HomePage"
      NAME="AdFrame" SCROLLING="No" WIDTH=100% MARGINWIDTH=0 MARGINHEIGHT=0>
      <ILAYER SRC="http://150.3.47.210/web/DomBanAd.nsf/WebAdShow?OpenAgent&X=Test&S">
    <! optionally put file delivery code to handle non-Netscape,non-IE browsers>
      </ILAYER>
      </IFRAME>
    <! end of embedded ad>

    JavaScript example

    This simple javascript header will load the generated HTML into a new window. Vary to change the attributes of the window, or to display the HTML within the main browser:
    <HEAD>
    <SCRIPT>
    window.open('http://www.server.com/DomBanAd.nsf/WebAdShow?OpenAgent&S&X=Home','AdFrame')
    </SCRIPT>
    </HEAD>

    SSI example

    The banner ad code can be invisibly merged into any part of a web page using a Server Side Include (SSI) call.A simple CGI program is attached below which will run on any brand of server on an Intel/Win32 platform; it should be detached into the cgi-bin directory of the server on which the banner site pages is served (not necessarily the same server as that serving the ads - you might have a site running on a MS IIS or Apache server, but ads served from a Domino server).
    <!--#exec cgi="/cgi-bin/dombanad.exe?http://www.myserver.com/web/"-->

    dombanad.exe
    If run with no arguments, this CGI program will default to fetching the ad code from the same server it is executed on, and will look for the Banner Ad database as DomBanAd.nsf on the root of that server. You only need enter as much of the full agent path as is required to override those defaults; e.g. in the example above, the ad agent will be called from http://www.myserver.com/web/DomBanAd.nsf/WebAdShow?OpenAgent. Other parameters, such as &R and &debug can be specified at the end of the URL and will be passed on to the WebAdShow agent. N.B. the syntax of SSI calls can vary by HTTP server.


    Results

    When called, Domino Banner Ad will dynamically build and deliver the HTML for the page in the 'ad' frame. The example dynamic code for a frameset might look like:
    <CENTER>
    <A HREF="
    http://www.server.com/DomBanAd.nsf/WebAdClick?OpenAgent&X=HomePage&A=KryptCom99&R=9795" TARGET="_top">
    <IMG SRC="
    http://www.server.com/DomBanAd.nsf/Ads/KryptCom99/$File/ad.jpeg?OpenElement" HEIGHT=40 WIDTH=400 ALT="Visit Krypt.com's 1999 Sale now!"
    ></A>
    <H6>Please support our sponsors by clicking on the ad above</H6></CENTER>

    The delivered code comprises five sections:
    1. Optional <BODY> parameters and <HEADER> tags, specified in the Ad document

    <META HTTP-EQUIV="Refresh" CONTENT="30">
    2. Free format leading HTML code, specified in the Ad document
    <CENTER>
    3. <A> tag to make the link to the click-thru agent
    <A HREF="http://www.server.com/DomBanAd.nsf/WebAdClick?OpenAgent&X=HomePage&A=KryptCom99&R=9795" TARGET="_top">
    </A>
    4. <IMG> tag to display the advert
    <IMG SRC="http://www.server.com/DomBanAd.nsf/Ads/KryptCom99/$File/ad.jpeg?OpenElement" HEIGHT=40 WIDTH=400 ALT="Visit Krypt.com's 1999 Sale now!"
    >
    5. Free format trailing HTML code, specified in the Ad document
    <H6>Please support our sponsors by clicking on the ad above</H6></CENTER>

    Some features to note:



    Scheduled Agents

    Three scheduled agents are supplied with Domino BannerAd:-


    For efficient database operation, and space conservation, use the purge agent regularly. It is also possible to switch on purge of impressions as they are clicked, but there remains the need to purge unclicked impressions - alternatively, all purging can be made by the agent reducing on-line time.

    By default the Purge agent operates every 2 hours, and the Ad Refresh agent once per day shortly after midnight.You may amend these schedules to fit your own environment.




    Performance Tips
    • If using File Delivery, in addition to regular purging of the impression documents, it is essential to minimize the number of deletion stubs held in the database. If uncontrolled, the database size will grow for long periods, even though purging of impressions is carried out regularly.
    • Notes retains minimal details of all deleted documents for a period of one third the number of days set in the replication setting 'Remove documents not modified in the last x days'. This defaults to 90 days, and hence the default deletion stub retention period is 30 days. If the database is not being replicated, this replication setting can be set to 0 days, and therefore deletion stubs will be immediately purged from the database.
    • HTML delivery is much faster than File Delivery. This is largely because the latter requires a server-side cookie to be created to track each ad between impression and click-thru. HTML delivery manages this by building the link into the generated HTML - reducing processing time for both impression and click-thru, and reducing database 'churn' (i.e. the number of documents being created and deleted).
    • For maximum database performance, switch off multi-dimensional (OLAP) statistics or create a separate database for the statistic documents. The more dimensions you select, the greater the overhead for maintaing multi-dimensional stats. Ad and site level stats have much lower overhead.
    • To improve the speed of delivering files - such as images, Java applets, Flash files etc - to browsers, these can be cached in a local file cache (under the domino/html) directory. Since native file system retrieval is usually much faster than retrieval from Domino databases, you can give your site an extra performance boost. See the caching FAQ for more details.
    • For file delivery, use internal redirection where your server supports this. In principal, this has been a part of Domino since v4.5, but in practice only R5.X servers can be assured to operate it. Internal redirects (a.k.a. 'double-bracketing') sends the file location URL immediately to the Domino web command engine, thus eliminating a double journey from the browser and back to the server. It also affects the URL as seen by the browser - with internal redirection, the actual file location is never revealed to the client.



    Cache Control

    N.B. The information here relates to browser and proxy caches, not to the internal file cache which can be switched on for Domino Banner Ad, and which is an invisible performance enhancing measure.

    For control over browser and proxy caches you need HTML delivery - for File Delivery ads you must rely on the poor cache control of the Domino server itself. With HTML delivery you have control over both the HTML Header and more importantly the HTTP Header (which is usually seen only by webmasters rather than web authors)

    HTML Header

    The HTML Header control can be switched on automatically by selecting the Block Browser Cache in the Ad document, or you can specify your own alternate META codes in the Header HTML field. However, despite the widespread use of META codes by hopeful web designers, they are often ignored in practice.

    A sample of code generated by the Block Browser Cache option is shown below - one advantage of using this function rather than hand coding the META statements in the Header HTML is that the expiry date and time are automatically calculated. Documents are expired within 60 seconds.

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="expires" CONTENT="Fri, 12 Nov 1999 14:57:38 GMT">
    <META NAME="revisit-after" CONTENT="1 days">


    Also, use the Randomize URL function, either by selecting this on in the Ad, or by putting a &R tag onto the URL for the agent.

    HTTP Header

    The HTTP header precedes every web page sent by a web server, and contains the most powerful controls available to you over how your pages are treated by remote browsers and proxy caches.

    META tags in HTML headers are only respected by certain web browsers, and will generally be ignored by proxy and in-line caches. HTTP headers allow you much more precise control, including the ability to separately indicate how proxy and browser caches should handle your pages.
    Sample HTTP Header
    HTTP/1.1 200 OK
    Server: Lotus-Domino/Release-4.6.7(Intl)
    Date: Mon, 29 May 2000 12:44:09 GMT
    Content-Type: text/plain
    Content-Length: 218
    Content-Type:text/html
    Expires: Mon, 29 May 2000 12:44:39 GMT
    Last-Modified: Mon, 29 May 2000 12:44:09 GMT
    Cache-Control: smax-age=60, proxy-revalidate, no-cache
    ETag: "943B30C845D25B52802568EE003DD680"
    Connection: Close

    The HTTP cache expiry counts in seconds how long the page should live in such a cache before being refreshed. Banner Ad will automatically generate an Expires header (HTTP 1.0 compatible) and a max-age setting (HTTP 1.1 only). In addition, it allows you to specify a separate expiry for proxy caches (which generates a smax-age setting) and will always include a Last-Modified date, which enables proxies and browser caches to make better cache decisions.

    Additionally, you can discriminate between public caches (such as that of a corporations proxy server, or an in-line cache used by an ISP) and private caches on the browser or mobile device. The private keyword selected in Cache Control specifies that the expiry period applies only to private caches, rather than public ones.

    Of the other cache control keywords available, no-store switches off all caching and no-cache is the equivalent of setting the expiry to zero seconds, i.e. the image will still be cached, but will expire immediately.

    The reason for separately controlling public and private caches is that some web material times out for everyone (like today's news), whereas other personalized content times out for individual users. If you wish to ensure that every hit to your page gets a fresh ad, then select no-store. If you want to have freshened ads, but don't want to supply new ads quite that often, tune the timings for the expiry counter.

    A new addition to HTTP 1.1 is the ETag - this allows down-stream browsers and caches to be object-aware; it is possible using ETags to discriminate between multiple ads sent using the same HTML address. When switched on, Domino Banner Ad will generate an ETag using the Universal ID of the Ad document being supplied. Another HTTP 1.1 addition is Connection Control - Banner Ad allows you to close this, to prevent an expectation of a persistent connection.

    HTTP Headers are not visible from web browsers, even when using the "View Source" option - this will show only the HTML header. A useful tool for viewing both types of header is gethttp.exe, also supplied by Rhizomatics.

    N.B. The cache control offered by Domino Banner Ad is far in advance of what is available from the Domino server itself (which is often criticized by webmasters for its poor caching support). Another good reason to use HTML delivery.

    Further information
    Page Testing Servicehttp://www.mnot.net/cacheability/
    Tutorialhttp://www.mnot.net/cache_docs/
    Cache Friendly Designhttp://www.casheflow.com/friendly/cflow-friendly.html
    Caching Newshttp://www.web-caching.com/
    Mobile Device Cachinghttp://avantgo.com/builder/caching.html



    Statistics, Reporting and OLAP

    Banner Ad always collects basic statistics, such as impressions and click-thrus, on the Ad and Site documents. Buttons exist both on the form and view to clear all statistics, or to reset for period. Performing a reset will keep both current and life-time statistics up to date, with a record kept of the last reset date.

    Additionally, Ad and Site documents may also be used to gather extended Ad and Site Analysis Statistics, such as analysis of browser network domains, and browser versions at both simple or detailed level. Naturally, the more stats you choose to gather the more processing work is involved, but the overhead of document level statistics is relatively small.

    For more powerful reporting, Banner Ad offers multi-dimensional (a.k.a. OLAP) statistics gathering for powerful reporting. These stats can be gathered in the same database as the ads, or in an optional separate database (with the same design template). The level of detail of the statistics is as broad or as narrow as you wish.

    Multi-dimensional stats are stored as Fact documents, created with two measures - impressions and click-thrus, and a choice of dimensions, including multiple hierarchies (e.g. Day, Month,Quarter) for the time dimensions. Dimension selection is carried out from the Settings document. The more dimensions selected, the greater the processing time and disk space requirements to hold the data. On the other hand, each dimension is a different independent method of analyzing the resulting data, and can be used in combination with other dimensions for any type of query.

    Two simple views are provided in the Analysis Menu to analyze the fact documents. However, to benefit from the full available power, a separate reporting tool or hypercube builder, such as Seagate Info, Business Objects, MS Access or Excel is recommended.



    XML Reporting

    Optional reporting by XML is included both as a useful new way of reporting, and as an example of how to code the various XML delivery components in Notes, and how to make them dynamic. N.B. This requires an XML-enabled browser, MS Internet Explorer 5 recommended.

    The sample report included here has a number of features which distinguish it from vanilla XML or what can be done with HTML:

    There are three elements required for an XML report, each with its own LotusScript agent:

    To display the report, call the web agent which produces the XML data. An example URL is:

    http://www.me.com/dombanad.nsf/report.xml

    The plainly formatted data includes the following lines, which call the other two web agents to complete the output:

    <?xml:stylesheet type="text/xsl" href="http://www.me.com/dombanad.nsf/report.xsl"?>
    <report xmlns="x-schema:
    http://www.me.com/dombanad.nsf/report_schema.xml">

    N.B. You must ensure that the Base URL is set in the database preferences, so that the correct URLs can be built for both the stylesheet and namespace. In the examples above, it is highlighted in green.

    An XML enabled browser will show not the actual XML file (although this can be seen using the 'View Source' option), but the dynamically generated HTML produced by the actions of the stylesheet on the base data. Internet Explorer 5 will also allow you to call the stylesheet and namespace directly from the browser, and display these as properly structured documents, rather than plain text - a useful aid in debugging XML.

    To expand the reporting capabilities, it is not neccesary to create another stylesheet, namespace and XML data output for every report - all that is required is a new stylesheet for the new report. A stylesheet can contain not only HTML formatting instructions, but also filtering, field selection and sorting power.


    Security Model

    The Domino security model for web agents, as described in the documentation, allows a simple choice for authentication between the signer of the agent and the remote browser user who runs the agent. In practice, operation is not so simple, since Domino cannot be relied upon to consistently apply the published security model - and the pattern of inconsistency varies between QMR and QMU releases.

    The one certainty in a security model for a web agent such as banner ad displays, is that there must be no authentication box for access to such an agent. It would be ridiculous to expect a casual visitor to a corporate home page to be faced with a login box before a banner ad could appear in the browser.

    The next principle, is the need to assign remote users the minimum possible permissions in order to execute the agent. In the context of the apparent Domino security model, this can fairly easily be accomplished using a combination of public access switches and the ability to base security for an agent on the signer. This will not, however, actually work - at least until Lotus iron out the problems with web agent security.

    v2 applies the following security model:

    N.B. For upgraders to v2 run the Upgrade\Make Documents Public Access agent once after upgrading in order to support the security model above. This will add a field called $PublicAccess with a value of "1" to each document - this permits web users with Reader access to update such documents via web agents.

    If Anonymous rights are set to Editor, then there's no need to set individual documents to Public Access; however, it is not recommended for Internet use to give unknown browser users a whet more access rights than is absolutely necessary - somebody, somewhere will try to abuse any such gap in your web armour.


    Frequently Asked Questions

    Questions

    Answers

    I can't get any banner ad to appear on my page

    Check that:-

    a) You have signed the Domino Banner Ad database with a locally certified ID. This can be done quickly and simply using the Database Tools section of the Notes Server Administration screen.

    b) Try executing the agent directly from the browser, rather than specifying the address inside an IMG tag. When you do this, any error messages returned by the Domino server or Domino Banner Ad will be displayed on the screen, whereas when called by an image tag, the browser will only display a 'bad image' icon. You can obtain further textual information on any problem by using the &debug parameter.

    e.g. http://myserver/DomBanAd.nsf/WebShowAd?OpenAgent&debug

    If you don't get a debug report, then the agent is not being run at all - either because your URL is not specified correctly, or there's a permission problem on the server.

    c) Check the syntax of your URL. If you've shifted the DomBanAd.nsf database to a subdirectory on the server, your URL will have to change to compensate. Easy way to test your root URL is to open the DomBanAd database directly in a browser. The simple URL http://myserver/DomBanAd.nsf will open up the default web navigator of Domino Banner Ad, if your URL is right.

    d) Make sure you have adverts in the database! Domino Banner Ad comes with a sample ad, but if you've deleted all of these, it isn't going to be able to display any ads.

    e) Check the Server's Agent Restrictions. Since the agent must create files at operating system level, it is categorized as an Unrestricted LotusScript Agent. Ensure that the agent signer (if signer-security is being used) is included in the Agent Restriction section of the appropriate server document in the Name and Address book. If you can only acquire Restricted LotusScript rights then use the WebAdShowRestrict and WebAdClickRestrict agents.

    f) Check the Agent Execution Rights option. The rights to run a Domino web agent can be determined by who signed the agent, or by the person executing it (the choice is made via the "Run Agent as Web user" option on the agent's properties box). Since the latter will usually be anonymous, the agent signer method is preferred.
    N.B. An excellent summary of the issues involved in Domino web agent execution and security is available in Julie Kadashevich's article in August 1997's Notes Today webzine.

    g) Check the Database Access Control (ACL) There must be an entry for Anonymous, to prevent the server requesting authentication for every access. However, so long as the agent is being run with the signer's security (see item above) there is no need to give Anonymous users any more than No Access access, so long as the Read Public Documents is switched on. All of the web agents, and all of the error report forms, are marked as public documents.

    h) Edit and Save the preferences document. This is found under Edit Settings action.


    How can I find out who is visiting my pages?

    The banner ad agents maintain a LastBrowser and LastAddress field automatically in the Account document to record. Additionally, you have the option of detailed analysis in the Ad document of both displays and clicks by browser and domain. Full multi-dimensional (a.k.a. OLAP) statistics allow you to track any desired combination of browser type, time of day, domain etc.

    Can I mail stats to my users?

    There isn't an agent for this at present, but it is scheduled for a future Domino Banner Ad release. Meantime, if you wish to run your own agent, either using the simple Notes agent actions or in code, there is a field called StatsRecipient in the Account form for this purpose.

    What controls which ad is shown next?

    Ads are stacked up ready for next showing in the hidden view called (Ad Stack). This view is not locked, and the formulae for selection can be amended, so long as the basic structure of the view remains.

    There are 5 factors which control ad selection. Primary is delivery mechanism - sites which use File Delivery cannot display ads with HTML content but no image; sites using HTML Delivery can display any ad. Secondary is placement - adverts sited for top locations will always be sited on page-top sites; only if no other ads are available will a bottom, frame or middle sited ad be placed on a page top. Rotating evenly is controlled by the Ads Shown to date, Priority and Ads Shown today. The latter is used to dampen down the effect of introducing a new ad (with zero displays) into an existing set of ads with 1000s of displays to date - without the dampening effect of counting in that day's displays, the new ad would be shown continously until it had reached a similar display count to its predecessors. Finally, Priority is used to weight the effect of ads shown to date.

    The formula currently used to sort ads for display (in ascending order) is:
    (AdsShown-(AdsShown*(1-AdPriority)))+(AdsShownToday*2)

    Priority has the effect over time that 3 ads registered at the same time, one with 200% priority, one with the default 100% and the other with 25%, might after several months be balanced out after rotation at 20000, 10000 and 2500 hits respectively.


    What does it cost?

    At present, nothing. Rhizomatics reserve the right to charge for any future enhanced version, but whatever, you may continue to use this current database for the rest of your Domino-using life. If you really feel appreciative, then a little acknowledgement on the banner ad with a link back to us would be sweet.


    Isn't it inefficient to use LotusScript rather than say perl?

    Using LotusScript has the big advantage of moving all the admin for managing adverts and page accounts within Notes databases, with all their facilities for extension and security. What's the price for that extra functionality?

    Domino Banner Ad has efficiency advantages over standard cgi-bin scripts: it doesn't require an operating system shell to be created to load Perl and run the script (cgi-bin scripts can hit your server hard), and executes within the already loaded Notes agent manager. If you wish to gauge the effect of detailed statistics gathering, use the &debug option to run the agent at different levels of analysis.

    So with Domino Banner Ad, you have all the advantages of databased ad processing, without the performance penalty.

    Why aren't the LSS files for the agents included in the ZIP distribution?

    Domino BannerAd is currently distributed free for use in any situation. However, it makes use of techniques and code which are the commercial property of Rhizomatics and is reserved for future products. Note, these source code files are not required for the operation of Domino Banner Ad. The only effect is that you cannot edit the code of the two web agents; however, all agents, views, forms and other elements are totally unlocked and available for your inspection or modification. This structure also minimizes agent loadable image size and boosts agent performance.

    Why doesn't clicking on ads work on browser X?

    File Delivery relies on three pieces of information to make a link between a displayed ad, and the forwarding URL to be used when the ad is clicked: the account (or page reference), the remote address, and the referring page URL.

    Different browsers can handle referring URLs differently. For instance, Netscape will return a suffix beginning with # when the ad is in a Notes section or reached via an internal page anchor, while Internet Explorer will not. Banner Ad has a setting to standardize such behaviour - from the Settings document, select 'Trim URL' to trim any browser URL with this suffix.

    You can have direct control over which information is used to make that link between impression and clickthru. To do so, adjust the 'BrowserTracking' control in the Settings document. The IP address is mandatory, but the choice of account code, user agent and/or referring URL is optional. N.B. Omitting the account code will mean that only one unique banner ad per web page can be tracked. If you have problems with certain browsers not tracking ads, switch off 'Referer' first. This will also marginally boost performance.

    Altenatively, use HTML Delivery and the link between image and ad is built right into the dynamically generated HTML - this is faster, and allows much more control and image options.

    How do I get an ad to automatically refresh itself?

    For this you need HTML delivery. Choose the number of seconds before a refresh is made and enter into the Auto Refresh field of the Advanced HTML Delivery section in the Ad document.

    Alternatively, roll your own custom meta code using the Header HTML field, for example:

    <META HTTP-EQUIV="Refresh" CONTENT="10">

    The content in this case is the number of seconds before this page or frame should be automatically refreshed. On each refresh, another ad will be selected from the stack of ads, and a new set of HTML generated for the frame.

    How do I prevent browsers caching ads?

    See the section on Cache Control

    How do I stop Domino creating it's own HTML header and BODY tag?

    Banner Ad will automatically override the standard Domino document preamble, and give you total control of the HTML output whenever you enter values for any of the following in the Ad document: HTML header, Body Parameters, HTTP Header, Auto Refresh, Block Browser Cache.

    Gaining control in this way is achieved on Domino by outputting an HTTP header before outputting any HTML. Current versions of Domino will acknowledge this when the following header is used:

    Content-Type: text/plain
    Content-Type: text/html

    If you have a need to change or augment this header, for example for a future version of Domino with different behaviour, you can take control of the HTTP header by supplying your own in the HTTP Header field of the Ad document.


    How do I create a Java applet ad?

    Java applets can be used with File or HTML delivery, but require HTML delivery for anything other than the simplest (single class, no parameters) applets.

    To create an ad,

    For file delivery, Banner Ad will simply supply the binary class (as loaded by the Load Media button above) file to the browser when called by the WebAdShow agent using the &J parameter.


    For HTML delivery, Banner Ad will dynamically generate and send to the browser complete HTML to specify the applet, complete with applet parameters, codebase and alternate text.


    How can I target ads at specific locations?

    Banner Ad has two complementary mechanisms for targetting banner ads. One is the Site Group, and the other is the Banner Location (on the page).

    Each banner site can be marked as belonging to a certain Site Group, and each ad can be marked as targetted at a list of one or more groups, including the special group 'Ungrouped' which allows ads to be displayed on sites with no group specified.

    Banner location allows banner ads to be targetted at particular locations on a page, and also to direct multiple ads onto the same page. First of all, sites must have recorded the extact location on the target web page - top, bottom, middle or frame. Then ads can be selected for which, or all, locations on a page they will be targetted at.

    If no ad can be found which meets the criteria for a particular site, a special ad called Default Ad will be displayed. To prevent this ad from being selected in the usual course of events, change it's status to Default

    Why do I get a browser message complaining about insecure items on a page?

    If the page containing the banner ad is secure, i.e. accessed using https protocol, then you must ensure that the SRC parameter specifying the banner ad location also uses https rather than http protocol. Otherwise browsers will complain that there is a mix of secure and insecure items on the same page.

    How and why do I use local caching?

    Sending files to browsers from within Notes documents is usually always slower than retrieving them from the server's native file system. With local caching, Banner Ad will copy files into a specified server file directory, and serve images to browser clients from there. This can give you a boost to perceived client performance, and reduce the workload on your server.

    Configure caching in the Settings document. You must:-


    See the lesson below for help on how the two types of Domino paths work.

    Domino Banner Ad will automatically cache files as required, creating unique sub-directories for each ad so that there will be no clash between files of the same name used in different ads. Whenever you make a change to the Ad document, the Recache checkbox will be ticked to indicate that the next time this Ad is required, Banner Ad will reload the cache from the files stored in the Ad document.

    It also allows whole groups of files - e.g. for Java ads - to be cached together. Banner Ad will automatically adjust the CODEBASE of Java ads to take account of the cached file locations of its support files.

    To clear the cache down periodically, you can use the scheduled Purge Cache agent to remove all the cached directories and files.

    Short Lesson on Domino Paths
    Domino serves two types of content - rendered Notes documents from databases (NSF files) stored in the server's Notes Data directory (e.g. c:\notes\data), and native file system files from a directory structure which usually sits beneath the Notes Data directory. In this second mode, it operates in the same fashion as any vanilla HTTP server, simply serving up GIF, JPEG and HTML files, but including abilities such as Server Side Includes.

    The Domino server installation program creates the domino directory structure automatically, with standard sub-directories domino\html, domino\icons, domino\adm-bin, domino\cgi-bin and domino\cache. Web files are stored within the domino\html directory, which may itself have a whole struture of subdirectories beneath it.

    For example, on an NT server if the server Notes Data directory is d:\notes\data, the web file directory would be d:\notes\data\domino\html. Other operating systems follow a similar pattern, e.g. /opt/lotus/domino/data/domino/html.

    Caveat: it is possible to override these default locations for the domino subdirectories in the Server document of the Name and Address book (a.k.a. in R5 as the Domino Directory database).

    Key Point: As far as a client browser is concerned, domino/html is the root directory of the web server.

    Hence, if your Domino server is called www.mycorp.com and the HTML directory is d:\notes\data\domino\html, the native file d:\notes\data\domino\html\web\index.html will appear to the web browser as http://www.mycorp.com/web/index.html. Note too that web directory will always be in forward slashes, but the file system directory will depend on your server operating system (backslashes for NT, forward slashes for Unix).



    Updates

    For updates to Domino Banner Ad, check:-

    http://www.rhizomatics.demon.co.uk/


    Disclaimer

    LIMITED WARRANTY


    COPYRIGHT AND LICENSE


    Acknowledgements
    ----------------

    Domino is a registered trademark of Lotus, a subsidiary of IBM