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.
OASIS looks for a url (which can be passed in the url
CGI
variable, usually as part of a rich media creative). If found, it redirects
to that URL.
Next it looks for a creative ID. Embedded deliveries generate a link to
oasisc.php
that includes the creative ID, eliminating any
ambiguity about what creative was last seen. If found, the clickthrough for
this creative is delivered.
If neither a URL or creative ID is found, OASIS will try to match the clickthrough to a record in the Delivery table.
If provided, OASIS uses the iid
CGI variable as a unique
identifier for the impression. If sites use this variable, they must take
care to use the same value for iid
in each oasisi.php
/
oasisc.php
pair.
If no iid
is found, OASIS tries to obtain the user's unique
identifier from the OASISID cookie.
If a unique identifier 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, but note that it is extremely unreliable in this day and age of NAT-ed firewalls) 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_1 | couldn't acquire the semaphore used to determine whether the engine is in ov erflow mode | |
no_sem_2 | couldn't acquire the semaphore used to control access to the delivery tables | |
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 |