Advertisement System
Sections:
Database Table
Advertisement control
Geographic control
Click count
Buy link
Advertisement added to product e-mail blasts
The advertisement subsystem controls all banner, box, and other presentation advertisements. The system is also used by e-mail broadcasting system; where advertisements can be broadcast as stand-alone content to customer or as part of a product or CSC e-mail blast.
The advertisement system can be used in place of the featured products systems when greater flexibility in placement and content is required.
Including the following null HTML <A> TAG in your advertisement content will result in an auto-generated hyperlink replacing the null <A> TAG:
<a href="#">blah blah blah</a>The <a href="#"> hyperlink will be linked to the SendSafe.clc.asp webpage which counts the click and then redirects the visitor to the advertiser URL. The embedded link must exactly match <a href="#"> - failure to exactly match will result in broken links.
Set ClickLinkURL to the full URL (not site relative URL) of the clickcounter page. If you fail to set the complete URL then the link will not work on e-mail blasts.
The click count page is: SendSafe.clc.asp. A valid URL must include the click count page and the target page (defined by the URL parameter rurl=). The URL's domain name MUST exactly match the domain name of the site from which the advertisement was displayed (failure to do so will result in clicks not being counted). Example:
ClickLinkURL = "http://www.mysite.com/SendSafe.clc.asp?rurl=http://www.targetsite.com"
where www.mysite.com is the site on which the advertisement is displayed.
The clickcount page will update the clickcount on the advertisement record.
The auto-generated hyperlink will also contain tokens and tags which are used for tracking the specific customer or anonymous visitor. If a customerID is known at the time of clicking then an ecCustomerClickCount eventlog record will also be created with a target of the sendSafe.clc.asp file and a URL parameter = the adIDcode.
If a customerID is not known at the time of clicking then an ecVistorClickCount eventlog record will also be created with a target of the sendSafe.clc.asp file and a URL parameter = the adIDcode. These eventlog records provide attribution of an ad-click event to a specific customer or visitor.
Example of a click count advertisement:
ClickLinkURL = http://www.myweb.com/SendSafe.clc.asp?rurl=http://www.c-prompt-dev.com
HTML in advertisement:
[autoadvhyperlink]Click count[/autoadvhyperlink]
Resulting HTML:
<a href=http://www.myweb.com/SendSafe.clc.asp?rurl=http://www.c-prompt-dev.com&c=87843653&a=66360635&ZDI=yyy&EDI=xxx>Click count</A>
Including the following [TAG] in your advertisement content will result in a buylink being generated for a specific Part# (ItemCodeId). This function is useful for creating product ads on your site which add your product to a SendSafe cart. This function will not work correctly for intra-site hyperlinks. This function is disabled if included as part of an advertisement e-mail blast.
Note: The buylink function does not work on sites which are configured with:
Application("DirectAddToCart" ) = false.
[AUTOBUYLINK]add to cart[/AUTOBUYLINK]The [AUTOBUYLINK] tag will create a clickable hotspot/hyperlink which will add the specified item into the shopping cart.
Set ClickLinkURL to a string which
defines the item to be added to the cart. The sytax of the string is:
<SKU>,<Price Ea>,<Full name>
Example of ClickLinkURL entry:
ClickLinkURL = 456,150.00,My Item
Code placed in advertisement:
[AUTOBUYLINK]buy me now[/AUTOBUYLINK]
Resulting HTML:
<a href="#" onClick="return( advertSubmitFunction649989288());">buy me now</a>
<form ACTION=store.addbasket.asp?burl=http://www.myweb.com/sendsafe.bannerexample2.asp&ZDI=yyy&EDI=xxx&ia=yes METHOD=POST NAME=advertBuyObject649989288>
<Input type=hidden Name=AdIDCode ID=AdIDCode Value=649989288>
<INPUT TYPE=hidden NAME=FULLNAME value="Super Duper Item">
<INPUT TYPE=hidden name="ATTRIBUTE" value="none">
<INPUT TYPE=hidden Name=QUANTITY VALUE=1>
<INPUT TYPE=hidden Name=PRICE VALUE=150.00>
<INPUT TYPE=hidden Name=FORMACTION VALUE=ADDTOBASKET>
<INPUT TYPE=hidden name="PRODUCTCODE" value="6">
<INPUT TYPE=hidden name="QTYPRICELIST" value="">
<INPUT TYPE=hidden name="ORDERFLAGS" value="">
<INPUT TYPE=hidden name="COMMENT" value="">
</form>
<SCRIPT LANGUAGE=javascript>
<!--
function advertSubmitFunction649989288()
{
document.advertBuyObject649989288.submit();
}
-->
</SCRIPT>
IMPORTANT:
If the ASP page in which the type of ad is embedded does not have a handle for InstantAddToCart and InstantAddToCart is enabled then
the following subroutine must be added to the bottom of the page.
sub handleInstantAddToCartEvent()
ADVERTISEMENT GEOGRAPHIC CONTROL
Advertisements can be geographically controled by zipcode. A zipcode value is passed into the advertisement rendering logic. this zipcode can come from the customer record or search results or some other source. The system will limit ads as followed:
Advertisements are controlled, added, and deleted using the advertisement admin page.
Advertisements should not be deleted unless all history for the advertisement is also no longer needed. Instead of deleting the advertisement, the ad should be disabled.
Advertisements are rotated and balanced based on a complex selection algorithm:
When advertisements are first added to the system the ImpressionBalancer value should be set so that it is equal to or slightly less than all other competing advertisements. Failure to set this to an proper value will cause the advertisement to be displayed more frequently until ImpressionBalancer reached equality with other ads or not enough (in which case equality will never be reached). The advertisement admin page includes a tool which can be used to set the ImpressionBalancer value for a new ad.
Advertisements are controlled by the ASP file: SendSafe.Banner.inc.asp which contains advertisement programming objects.
OFF-SITE ADVERTISEMENT
The off-site advertisement setup give you the ability to control and display your advertisements on some other site.
The typical means of including advertisements in off-site pages is to
create an ASP page which does nothing but the advertisement in it AND then include that page in an
IFRAME in the off-site page.
To insert an advertisement into an off-site or 3rd party page you need the following code:
' INSERT ADVEERTISEMENT BASED ON URL PARAMETERS WITHOUT FRAME ' ' URL Parameters: C=CustomerID Z=Zipcode T=Type nl=NoList ' ' Example: ' mypg.asp?T=1&x=23218888&nl=167904149&c=0&z=75230 ' mypg.asp?T=1&x=19209233&nl=541690921-4637551&c=39791887&z=75230 ' ' CustomerId is used for click tracking (0 = not logged in OR CID) ' Zipcode is used for geographic control ' NoList is an optional array of ads which are excluded from showing ' Type = 1,2,3,4, etc. ' set banner = new sendSafeBanner banner.insertBannerAd() banner.insertBannerAdWithFrame()This code will use URL parameters passed into the page to display an advertisement.
An example of an off-site advertisement webpage can be found in the file: SendSafe.bannerexample.asp
insertBannerAd() will insert an advertisement without a frame. The advertisement will flow into whatever HTML controls are present.
insertBannerAdWithFrame() will insert an advertisement with a frame. The advertisement will flow into an HTML TABLE with the specified dimensions take from the Advertisement record. The table will have invisible border.
LOCAL ADVERTISEMENT
To insert an advertisement into a local ASP page you need the following code:
set banner = new sendSafeBanner dim noList, includeFrame, adtype, zipCode, custid custid = getCustIDStateVariable() noList = "" includeFrame = true adtype = 1 zipCode = getCustomerZipFromID( custid ) noList = banner.renderBannerAd( noList, adtype, zipCode, custid, includeFrame ) noList = noList & "-" & banner.renderBannerAd( noList, adtype, zipCode, custid, includeFrame )
renderBannerAd() is a function which renders an advertisement in an ASP page. The use of noList is shown where noList prevents duplicate ads from being displayed.
An example of an off-site advertisement webpage can be found in the file: SendSafe.bannerexample2.asp
ADVERTISEMENTS IN PRODUCT E-MAIL BLASTS
Specially coded advertisements can be included at the beginning and end of CSC and product e-mail blasts.
The special type codes are:
| type code | results |
| 10 | The add will be included at the very end of all product e-blasts following the "footer ad" (if any) |
| 100 | The add will be included at the begining of all product e-blasts and is designed to function as a general purpose header for e-mail broadcasts. |
| 101 | The add will be included at the end of all product e-blasts and is designed to function as a general purpose footer for e-mail broadcasts. |
| 1000+ | The add will be included at the begining or end of a CSC e-blasts. |
HTML in advertisements planned for e-mail distribution should not include any JavaScript or other client side code. This kind of code will be blocked by most e-mail reader programs such as Outlook.