This version of the script has been modified to allow you to view the admin page without a password. No other changes have been made.
Rate this Script @ The CGI Resource Index
Want to be notified whenever I release a new version of this script?
Your e-mail:

Add a banner

Step 1 - The Basic Stuff:

Banner HTML:
Weight:
Active:
If you don't care how many people click on this banner, want this banner to be displayed on every page which you're using this script on, and you want this banner to be displayed until you delete it yourself, click to add the banner. Otherwise, move on to the next step.

Step 2 - Keeping the Banner On or Off Certain Pages

Do you want the banner to appear on every page that you're using this script on?
Enter some text that only appears in the URL of the page(s) that you want to hide this banner from or only show it on. Do not include the http:// or your domain.
What should I do with pages that contain the above text in their URL?
If you don't care how many people click on this banner and you want this banner to be displayed until you delete it yourself, click to add the banner. Otherwise, move on to the next step.

Step 3 - Tracking Click-Throughs:

!!!Before having the script track click-throughs, make absolutely sure that you've read the warning!!!
Should I keep track of how many times this banner has been clicked?
As explained in the warning, the script will need to change the URL that the banner points to. This means that when a visitor passes their mouse over the banner, instead of seeing the "real" URL in the status bar, they'll see the URL of this script plus a unique code. However, the script can use javascript to show the original URL instead. Should it do this?
If you want this banner to be displayed until you delete it yourself, click to add the banner. Otherwise, continue to step 3.

Step 4 - Deleting or Deactivating the Banner:

Check off whatever conditions you'd like the script to look for:
Hide this banner once it has been displayed this many times:
Hide this banner once it has been clicked this many times:
Hide this banner the first time it has been displayed on or after the following date:
,
Should the script delete the banner, or just deactivate it when the conditions are met? If you choose to hide it, the banner will still be here, but it won't be shown until you reactivate it.
If you want the script to e-mail someone when the above conditions are met, enter their e-mail address here:
You can edit the text of the message using the appropriate form on the admin page

Delete or modify banners

First banner to view:
Last banner to view:

Statistics

Total banners: 17 (0 inactive, 17 active)
Total impressions:45632
Total click-throughs:2678
Average impressions per banner:2684.23529411765
Average click-throughs per banner:157.529411764706
Average impressions per click-through17.04

Edit e-mail message:

If you're having the script delete or deactivate banners after conditions are met, you can have it send an e-mail message when this happens. You can use this form to edit that message.
What is your e-mail address? This will go in the from field when the script sends the e-mail.
This script uses two different e-mail messages, one which is sent when click-throughs are tracked, and one for when they aren't. The following boxes contain the subject and body of each e-mail the script will send, except the following text will be replaced:
  • [DATE] will be replaced by the current date
  • [TIME] will be replaced with the current time
  • [ACT] will be replaced with "deactivated" or "deleted", depending on what you told the script to do.
  • [HTML] will be replaced with the banner's HTML
  • [IMP] will be replaced with the number of impressions
  • [CTR] will be replaced with the number of click-throughs
  • [RATIO] will be replaced with the ratio of impressions over click-throughs

This e-mail will be sent when click-throughs are tracked.
Subject:
Body

This e-mail will be sent when click-throughs are not tracked.
Subject:
Body

Suggest this script to a friend

Your e-mail address:
Your friend's e-mail address:

Explanations:

Banner HTML:

You should enter the full HTML for the banner you want to add here. This is exactly the same as what you'd add to a real HTML file to generate a banner. For example, if you wanted to give me a link (hint), you'd add
<a href="http://www.shavenferret.com/scripts/"> <img src="http://www.shavenferret.com/scripts/givelink/banner4.gif" height="60" width="468" border="0"></a>

Weight:

This is how often the banner will be displayed as opposed to other banners. For example, let's say you have three banners. The first's weight is set to 1, the seconds weight is set to 5, and the third's is set to 10. The second banner (weight 5) will come up 5 times as often as the first (weight 1), and the third banner (weight 10) will come up 10 times as often as the first, and twice as often as the second. If you want all of your banners to come up evenly, set all of their weights to 1, as it will make the script run faster.

Active:

Banners that are not active will not be displayed. If you may be showing this banner in the future, but you don't want it shown now, set it to innactive. When you decide that you do want the banner shown, you can activate it from the delete or edit banners form.

Impressions:

This is how many times the script has shown a banner.

Click Throughs:

This is how many times a banner has been clicked.

A warning about tracking click-throughs

It is literally impossible to track how many times a link has been clicked without changing the banner code. This is because when one of your users clicks a link, their browser goes straight to the URL without telling your server that it's leaving.

The script tracks click throughs by changing the links in the banner so that instead of pointing to the real URLs, they point to the script + a unique code. When a user clicks the banner, they are taken to the script, which quickly notes that they clicked the banner and sends them to the correct URL automatically. While the script takes care of all this for you, this creates three problems: