oasisc.php
is the script used to deliver a clickthrough. It is called in
an A HREF tag. For example:
<A HREF="http://oasis.yourdomain.com/oasisc.php?s=5&w=468&h=60">
You will note that in the tag, you are specifying three things:
OASIS uses these three pieces of information to look up in the Delivery table which creative of dimension w x h was last seen by the user on section s.
The first thing OASIS does is to try to obtain the user's unique identifier, stored in the OASISID cookie.
If a unique ID is obtained, OASIS will attempt to look up in the Delivery table the w x h creative which was last seen by the user on section s. If it finds it, it will deliver the clickthrough.
If no unique ID was obtained (or if no cookie was obtained), OASIS will look in the Delivery table for the w x h creative which was last seen by somebody at the user's IP address (hopefully this is the user himself) on section s.
If we did not get a creative ID, we deliver an empty Location string, which generally reloads the user's current page. This behavior might be something worth changing in the future so that the user gets some sort of error message.
If we _did_ get a creative ID, we have to note it in the Hourly Targets
shared memory segment (which of course, we do within the protection of
a semaphore so that we don't step on any other copies of
oasisi.php
or
oasisc.php
).
Now we grab the clickthrough URL from the Creative Clickthrough shared memory segment and print out a Location header (along with some cache control headers) to redirect the user to the clickthrough destination.
Finally, we log the clickthrough. We can record either "click" or "cerr" as the event. There are also a number of codes we can record:
Event | Code | Description |
click | success | normal delivery |
fallthru | got a cookie, but had to fall through to the IP address | |
nocookie | didn't get a cookie; had to use IP address | |
cerr | no_cr_found | couldn't find a CreativeID in the Delivery table |
no_sem | couldn't get semaphore | |
no_ht_array | couldn't find the hourly targets in shared memory (diagnostics may be available in parentheses) | |
no_ct_array | couldn't find the clickthrough URL in shared memory |