WillMaster Possibillites Logo EzineSeek Award
Master Link Monitor
by
William Bontrager

Permission is granted to reprint the article below in its entirety provided no changes are made to the article text and the author's name, signature lines, and copyright line are printed with the article. However, you may change the article's title.

Now there is an easy way to monitor your links and count the clicks. Text links, graphic links, email links, web page links -- Master Link Monitor can do the job.

Email links

Find out if the top spot actually is better than an ad in the middle of an ezine. Which word generates the most clicks, "free" or "easy"? Find out which ezine generates the most clicks from your doodad ad. How many clicks are you getting from your email sig file?

Now you can know those answers.

Web page links

Find out which graphic people click on the most. Is the top banner better than the one following your copy? Do people click on the text link more than the graphic link? Is your click count the same as your affiliated companies' counting software reports? Which generates the most clicks; the doodad description page or the doodad testimonial page?

Now you can know those answers, too.

This is how Master Link Monitor works

  1. Someone clicks on your link.

  2. Master Link Monitor logs the click and looks up the actual URL.

  3. The click is directed to the actual URL.

You assign a unique code to each link you want to monitor. The code can be any number of characters.

The code you assign, along with the actual URL, is put into a text file -- one code-URL set per line. The code and URL are separated with a space.

The text file contains each code you will use. The file is called a "code database" but is only a text file of code-URL sets, one set per line.

For example, let's suppose you participate in an affiliate program for doodads sponsored by otherpeople.com and your affiliate number is 333. You decide that the code "doodad" is appropriate. The affiliate URL might be http://otherpeople.com/doodad.cgi?affiliate=333

Your line in the code database would be:

	doodad http://otherpeople.com/doodad.cgi?affiliate=333

And the link you publish would look something like http://mydomain.com/MasterLinkMonitor.cgi?doodad

Now, when someone clicks on your published link, Master Link Monitor gets the call. It logs the click and looks in your code database for doodad's actual URL. The click is then directed to that URL.

Each code has its own log file. The log file records the date and time of the click and, if a referring URL is available, records the referrer. The log records one click per line.

(NOTE:Complete instructions for installing Master Link Monitor and setting up the code database are in the script itself.)

If you want to test different ads for the doodad, you might have codes like:

	doodad http://otherpeople.com/doodad.cgi?affiliate=333
	doodad1a http://otherpeople.com/doodad.cgi?affiliate=333
	doodad1b http://otherpeople.com/doodad.cgi?affiliate=333
	doodad2 http://otherpeople.com/doodad.cgi?affiliate=333

To make it easier to read and remember what each code is for, you can put notes into your code database by placing a "#" character at the beginning of the line. Master Link Monitor will also ignore blank lines. Thus, your database might look like:

	# Doodad code for web page banners and text links
	doodad http://otherpeople.com/doodad.cgi?affiliate=333

	# Ezine ad tests:

	# ezine 1a -- Weekly Special Things issue January 2, 2002
	doodad1a http://otherpeople.com/doodad.cgi?affiliate=333
	# ezine 1b -- Weekly Special Things issue January 9, 2002
	doodad1b http://otherpeople.com/doodad.cgi?affiliate=333

	# ezine 2 -- Alternate Stuff issue February 18, 2002
	doodad2 http://otherpeople.com/doodad.cgi?affiliate=333

To make shorter URLs, you can name Master Link Monitor whatever you wish so long as the file name extension is compatible with your server's CGI requirements. (We call ours "url.pl")

In addition to the separate log file maintained for each code, Master Link Monitor also maintains a default log file. The default log file contains a record of any invalid codes received, requests that contained no code, and internal errors it might encounter (such as an inability to update a code's log file).

Master Link Monitor uses a default URL when it encounters an invalid code or a code absence. You can set the default URL to a special page you create for that situation or you it can be the URL to your home page, whatever you decide.

The Master Link Monitor script contains complete installation instructions.

After Master Link Monitor is installed, all you have to do is add code-URL sets as you think of links you want click numbers from. And whenever you're curious about how many clicks occurred, just view the log file for that code.

The Master Link Monitor script is at:

http://willmaster.com/a/url.pl?self

Happy link click counting!

If you want help or have questions, please contact me.

Copyright 2000 by William and Mari Bontrager

William Bontrager, Programmer and Publisher
"Screaming Hot CGI" programs
"WillMaster Possibilities" e-Newsletter
http://willmaster.com/possibilities/
subscribe-possibilities@willmaster.com