image provider

Affiliate Manager


Disclaimer

This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.

The Problem

On my website I link to dozens of companies that pay a royalty for click-thrus, or who pay a royalty if someone buys something via my link referral. It is a lot of mind-numbing work maintaining the HTML (Hypertext Markup Language) links to those products. If I am not careful, links stop working or become unacceptably slow. From time to time the affiliate companies change the html I need to insert on my website. Then I have to find and modify it all, or regenerate each one. Affiliates drop me if I don’t log in from time to time. I have to remember to visit them and check my email addresses etc. is current. The HTML links themselves are inscrutable. You have no clue how they will render, what product they sell, or whether the link code is curren.

How The Affiliate Manager Database Software Works

There is a database that contains the URL (Uniform Resource Locator) of the login page for each affiliate company with user id and password. It also has the url of the product itself if I want to bypass the affiliate company. It can spawn an URL to log you in automatically to any database or export a set of vendor bookmarks.

The database tracks which products are handled by which vendors. That way I can look up by product or by vendor or products or any other plausible SQL (Standard Query Language) query.

It also tracks the HTML for the links currently inserted. You can change the HTML in the database and have it propagated to wherever it was used in the website. Spots for HTML to be inserted are marked with:

<!-- affiliate theNameOfTheProduct -->
The affiliate manager will go through my entire website replacing the macros with the current HTML from the central database and record where it found the links, so the database also records where in each web page links to each product are.

The affiliate manager also tracks the date you last refreshed the link code from the service bureau. It can then warn you to test or refresh old link HTML.

Boiler Plate

There are also generic templates much like the macro I use to generate Poster references.
affiliate: for how Poster macro works

This way, if the vendor changes the HTML required, you only have to change the template in the database, not every product instance. The templates might be written as Java classes the way Poster works or as sample HTML text marked with XXXXX where the product-id fits in.

You need tools to take sample HTML and convert it to templates which consist of a skeleton and a set of plug-in numbers such as the product number, the banner image name and the width and height of the banner. You then need store only the numbers and the template id in the product database and regenerate the HTML link as needed. The template could be a data structure or Java source code that is compiled. You might look at the logic in Quoter for some ideas.

The idea is, if the service bureau changes your associate id, you don’t have to manually change each link. You just change the template and all products using that template are automatically fixed. Ditto for a change in the format of the bubblegum for creating a link

Validation

The HTML that service bureaus give you is typically atrocious. It will not pass HTMLValidator. Typical problems inclued: The problem is, when you clean it up, often the vendor detects that and stops counting your sales. You have to experiment to find out just how much cleaning you can do. The HTML the service bureaux use know nothing of your CSS styles or the look and feel of your site. Ideally you want to modify the supplied HTML to make the links blend better with your style of layout and colours.

Banners served by the service bureau can greatly slow down your page loads. I find it best to lie to the service bureau that I am doing text-only links and supply my own local banner. You want to be able to pull off this stunt at the press of a button in the affiliate manager.

The affiliate manager should generate test pages of HTML that contain links to various products labeled with affiliate and product. You can then quickly review how they look and perform without having to chase all over your entire website. Sometimes vendors drastically change the look of a banner. I found for example ads for a gay dating service changed to ones for a straight dating service without my permission! You need to monitor these errors visually. Broken link detection won’t suffice.

The affiliate manager should also generate individual test pages for a product to validate with HTMLValidator. You can then import the cleaned up HTML back into your database, in html or template form.

Conversion

To start, your website will have a hodgepodge of manually inserted HTML for all manner of links. The affiliate manager will have to parse the website and extract that html and replace it with markers. You will have to use temporary mechanically generated product names.

Then in the database you can rename the products to something meaningful, (which will then rename the embedded website markers). In the database you can detect patterns and replace them with templates and generally tidy up the HTML. You can export it into test pages and eventually get it all correct. Some links will have to be deleted altogether since they point to non-existent products or service bureaus. You typically want to manually touch up the HTML on your website since surrounding text will likely have to change as well. Ideally you replace the link with a better link, perhaps from a different service bureau, or perhaps a direct royalty-free link to the vendor when no service bureau exists.

The idea is your links to products use your invariant names in embedded markers. The database decides on the service bureau, if any and the sort of HTML needed to represent that link.

Polishing

You need to use the affiliate manager yourself to maintain a website. That way you will be aware of awkwardness and tasks that need further automation or simplification. Volunteer to manage the affiliate links on someone’s website, or find volunteers to use your software willing to give you lots of feedback. Nothing beats using your own program on a daily basis over a period of years to fine polish it.

Your program can come preconfigured with the URLs (Uniform Resource Locators) of many serivce bureaus and companies that handle their own programs. It could be preconfigured with template extraction code. At the very least you want to verify that the affiliate id in the HTML is up to date.

Instead of the database manager modifying the website HTML, you could generate the HTML link code on the fly using JSP or other Servlet approach.

If you get this working, I’d love to be your first customer or beta tester.

affiliate
exec
HTMLValidator

This page is posted
on the web at:

http://mindprod.com/project/affiliatemanager.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\project\affiliatemanager.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.221.235.209]
You are visitor number