![]() |
![]() |
|
|
Setting Up Ads for Campaigns
An ad is a document in your content management system that an ad placeholder displays. Ads can be an integral part to a campaign. For example, campaigns can specify as a goal to record a specific number of ad clickthroughs.
This topic includes the following sections:
For more information about ads, refer to "Working with Ad Placeholders" in the Guide to Building Personalized Applications.
Describing the Ads in Your Content Management System
The queries that a BA defines for ad placeholders search through the descriptions (attributes) that you attach to the documents in your content management system. WebLogic Portal places no restrictions on the set of attributes that you use to describe your ads. For example, you can create attributes that describe the name of the product that the document advertises, the name of the ad sponsor, and a product category that matches the categories in your e-commerce product catalog.
We recommend that a BA analyses your advertising strategy and proposes a set of attributes that describe the ads in your content management system.
For information on adding attributes, refer to the documentation for your content management system. If you use the reference content management system, refer to Loading Ads into the Reference Content Management System.
Specifying Display and Clickthrough Behavior
Ad placeholders use a set of document attributes that you define in your content management system to support the following features:
For information about associating attributes with documents, refer to the documentation for your content management system. If you use the reference content management system, refer to Loading Ads into the Reference Content Management System.
Table 2-1 describes the adWeight attribute, which you can associate with XHTML, image, and Shockwave documents.
Table 2-2 describes attributes in addition to the adWeight attribute that you can associate with image files.
Table 2-3 describes attributes in addition to the adWeight attribute that you can associate with Shockwave files. Ad placeholders and the <ad:adTarget> tag format these values as attributes of the <OBJECT> tag, which Internet Explorer on Windows uses to display the file, and the <EMBED> tag, which browsers that support the Netscape-compatible plug-in use to display the file.
For more information about these attributes, refer to your Shockwave developer documentation.
Loading Ads Into Your Content Management System
This section contains the following subsections:
Loading Ads into a Third-Party Content Management System
You use the same procedure for loading ads into your content management system as you use for loading any other document. For information on loading documents, refer to the documentation for your content management system.
For more information about using a content management system with WebLogic Portal, refer to "Creating and Managing Content" in the Guide to Building Personalized Applications.
Loading Ads into the Reference Content Management System
WebLogic Portal provides a content management system for sites with limited content-management needs. If you use the reference content management system, you must load ads and ad attributes at the same time. You cannot add attributes to documents that have already been loaded.
When you install WebLogic Portal, the reference content management system (which uses the sample Cloudscape database) already contains a set of sample ads. If you set up other supported databases, refer to "Deploying Your Business Data" in the Deployment Guide, which describes using the loadSampleData script to populate your database and the reference content management system with sample data. This section describes loading ads into the reference management system in addition to any ads that you loaded into the system using the loadSampleData script.
Note: The reference content management system requires different processes for loading ads and loading other documents that you do not use as advertisements. This section describes only the process of loading ads. For information on loading other documents, refer to "Creating and Managing Content" in the Guide to Building Personalized Applications.
To load ads and ad attributes into the reference content management system, you must do the following:
Set Up Attributes in HTML Documents
For ads that contain only HTML, you must place document attributes in <META> tags within a document's <HEAD> element. Use the following syntax in the <META> tag:
<META name="attribute-name" content="attribute-value">
Use a separate <META> tag for each document attribute. For example:
<META name="attribute1-name" content="attribute1-value">
<META name="attribute2-name" content="attribute2-value">
<META name="attribute3-name" content="attribute3-value">
Listing 2-1 shows an HTML file that contains a simple ad with several attributes.
Listing 2-1 Attributes for an HTML Ad
<HTML>
<HEAD>
<META name="adWeight" content="3">
<META name="productCategory" content="hardware">
<META name="productSubCategory" content="electic drill">
<META name="productName" content="Super Drill">
<META name="Manufacturer" content="ACME">
</HEAD>
<BODY>
<P>Buy our Super Drill. It'll get the job done!</P>
</BODY>
</HTML>
Set Up Attribute Files for Image and Shockwave Documents
For ads that are images or Shockwave movies, you must place attributes in a separate file. Each image or Shockwave file must be accompanied by a separate file that is named with the following convention:
filename.extension.md.properties
Both files must be located in the same directory.
For example, for an image file named superDrill.jpg, you must place attributes in a file named superDrill.jpg.md.properties.
Within the filename.extension.md.properties file, use the following syntax to express attributes and values:
attribute-name=attribute-value
Listing 2-2 shows an example file that contains attributes for an image ad.
Listing 2-2 Syntax for the Attributes File
adWeight=5
adTargetUrl=AcmeAds/saws.jpg
adAltText=Buy ACME and save!
productCategory=hardware
productSubCategory=electic drill
productName=Super Drill
Manufacturer=ACME
Move Files Into the dmsBase/Ads Directory Tree
All HTML, image, and Shockwave files, and all attributes files must be located below the following directory:
PORTAL_HOME/dmsBase/Ads
where PORTAL_HOME is the directory in which you installed WebLogic Portal.
You can place documents in subdirectories of the Ads directory, though the reference content management system does not use the subdirectories to organize documents.
If you use subdirectories to manage your source files, you must place the attributes files in the same directory as the files that they describe. For example, superDrill.jpg and superDrill.jpg.md.properties must be in the same directory.
Run the loadads Script
The loadads script loads documents from the dmsBase/Ads directory to the content management system. It also attaches attributes to the documents.
The pathname for the script is as follows:
PORTAL_HOME\bin\win32\loadads.bat (Windows)
PORTAL_HOME/bin/unix/loadads.sh (UNIX)
where PORTAL_HOME is the directory in which you installed WebLogic Portal.
For more information on loading documents into the reference content management system, refer to "Creating and Managing Content" in the Guide to Building Personalized Applications.
Supporting Additional MIME Types
To display an ad, placeholders refer to a document's MIME type and then generate the HTML tags that a browser requires for the specific document type. For example, to display an image-type document, an ad placeholder must generate the <img> tag that a browser requires for images. By default, ad placeholders can generate the appropriate HTML only for the following MIME types:
If you are familiar with basic Java programming, you can write classes that enable placeholders to generate HTML for additional MIME types. To support additional MIME types, you must complete the following tasks:
Create and Compile a Java Class to Generate HTML
To generate the HTML that the browser requires to display the MIME type, create and compile a Java class that implements the com.bea.p13n.ad.AdContentProvider interface. For information on this interface, refer to WebLogic Portal Javadoc.
After you compile the class, you must make sure the class is available to the application. One way to do this is to add the class appropriately to one of the deployed jar files, such as placeholder.jar or your own jar file. Another way to make the class available to the application is to save it under a directory that is specified in the system's CLASSPATH environment variable. For example, create a WL_PORTAL_HOME/classes directory and add it to the set-environment script. For more information about the CLASSPATH environment variable, refer to "Setting Environment Variables," under "Starting and Shutting Down the Server" in the Deployment Guide.
Register the New Class
After you save the class in a directory that is in your classpath, you must notify WebLogic Portal of its existence:
<AdContentProvider
Name="MIME-type"
Provider="name-of-your-class"
Properties="optional-properties-for-your-class"
>
</AdContentProvider>
Provide the following values for the attributes of the AdContentProvider element:
For example, if you added WL_PORTAL_HOME/classes to the system classpath, save your class to support AVI files as WL_PORTAL_HOME/classes/myclasses/MimeAvi.class.
Alternately, if you have already deployed a JAR of your own Java classes called myServices.jar, add myclasses/MimeAvi.class to that JAR file.
To register your classname, add a subelement to the AdService element as illustrated in Listing 2-3.
Listing 2-3 Add An AdContentProvider Element
<AdService
Name="wlcsApp"
DisplayFlushSize="10"
Rendering="com.bea.p13n.ad.AdContentProviderBase"
EventTracker="com.bea.campaign.AdTracking"
AdClickThruURI="AdClickThru"
ShowDocURI="ShowDoc"
>
<AdContentProvider
Name="text"
Provider="com.bea.p13n.ad.render.TextContentProvider"
Properties=""
>
</AdContentProvider>
<AdContentProvider
Name="image"
Provider="com.bea.p13n.ad.render.ImageContentProvider"
Properties="AdClickThruURI=AdClickThru;ShowDocURI=ShowDoc"
>
</AdContentProvider>
<AdContentProvider
Name="application/x-shockwave-flash"
Provider="com.bea.p13n.ad.render.ShockwaveContentProvider"
Properties="ShowDocURI=ShowDoc"
>
</AdContentProvider>
<AdContentProvider
Name="video/x-msvideo"
Provider="myclasses.MimeAvi"
Properties=""
>
</AdContentProvider>
</AdService>
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|