|
|
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. Campaign Manager for WebLogic 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 Campaign Manager for WebLogic, refer to "Creating and Managing Content" in the Guide to Building Personalized Applications.
Loading Ads into the Reference Content Management System
Campaign Manager for WebLogic 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 Campaign Manager for WebLogic, 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 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:
WL_COMMERCE_HOME/dmsBase/Ads
where WL_COMMERCE_HOME is the directory in which you installed Campaign Manager for WebLogic.
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:
WL_COMMERCE_HOME\bin\win32\loadads.bat (Windows)
WL_COMMERCE_HOME/bin/UNIX-platform-type/loadads.sh (UNIX)
where WL_COMMERCE_HOME is the directory in which you installed Campaign Manager for WebLogic.
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:
Add the New Type to the Deployment Descriptor
Each Campaign Manager for WebLogic Web application must specify its deployment requirements in an XML file called a deployment descriptor. To add a new MIME type for ad placeholders, you must modify the deployment descriptor for your WebLogic Personalization Server Web application. You can use a text editor to modify the deployment descriptor.
If you use the example portal as a framework for developing your own Web application, then the deployment descriptor is located at the following pathname:
WL_COMMERCE_HOME/config/wlcsDomain/applications/wlcsApp/exampleportal/WEB-INF/web.xml
where WL_COMMERCE_HOME is the location in which you installed Campaign Manager for WebLogic. Your Web application might be in another location. Contact your Campaign Manager for WebLogic administrator for information on which deployment descriptor to modify.
The deployment descriptor for your WebLogic Personalization Server Web application already contains a set of mappings for MIME type. Before you add a new type, review the existing mappings. Listing 2-3 illustrates a single MIME mapping from the example portal's deployment descriptor.
Listing 2-3 MIME Mapping in exampleportal/WEB-INF/web.xml
<mime-mapping>
<extension>
jpeg
</extension>
<mime-type>
image/jpeg
</mime-type>
</mime-mapping>
To add a new mapping, use the following syntax:
<mime-mapping>
<extension>
file-extension
</extension>
<mime-type>
type/subtype
</mime-type>
</mime-mapping>
where file-extension is the extension of the file type you want to map and type/subtype is a recognized MIME type and subtype.
Make sure that you provide end-tags for each of the XML elements.
When you save the modified deployment descriptor, you must restart the server to deploy the modifications. However, we recommend that you do not restart the server until you have registered the new Java class in weblogiccommerce.properties as described in Register the New Class in weblogiccommerce.properties.
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 bea/commerce/platform/ad/AdContentProvider interface. For information on the bea/commerce/platform/ad/AdContentProvider interface, refer to Campaign Manager for WebLogic Javadoc.
After you compile the class, you must save it in or below a directory that is specified in the system's CLASSPATH environment variable. For example WL_COMMERCE_HOME/classes is in the classpath. 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 in weblogiccommerce.properties
After you save the class in a directory that is in your classpath, you must notify Campaign Manager for WebLogic of its existence and purpose by adding a line to weblogiccommerce.properties. You can use a text editor to modify this file, which is located at the following pathname:
WL_COMMERCE_HOME/weblogiccommerce.properties
where WL_COMMERCE_HOME is the location in which you installed Campaign Manager for WebLogic.
To register your new class in the weblogiccommerce.properties file, find the section that Listing 2-4 illustrates. Then add a line that conforms to the following syntax:
adtargettag.rendering.mime-type.mime-extension=your-classname
Provide the following values for the variables in the previous syntax statement:
For example, WL_COMMERCE_HOME/classes is in the classpath. You saved your class to support AVI files as
WL_COMMERCE_HOME/classes/myclasses/MimeAvi.class
To register your classname, add the following line to weblogiccommerce.properties:
adtargettag.rendering.video.avi=myclasses.MimeAvi
Listing 2-4 Rendering Classes in weblogiccommerce.properties
###############################################
# AdTargetTag Properties
adtargettag.rendering=com.bea.commerce.platform.ad.AdClickThruServlet
# This is the class that implements the AdEventTracker interface
# and is used to raise events
adtargettag.eventtracking=com.bea.commerce.campaign.AdTracking
# Additional classes to render content based upon mime type
# To use replace the "text.html" with the mime type, replacing any
# '/' characters with '.'
# Place the name of the java class that handles the mime type after the '='
#adtargettag.rendering.text.html=
Tip: Clearing Scenario Queries from an Ad Placeholder
In the E-Business Control Center, a BA can create a scenario action that places a query in a specific ad placeholder when an event or some other state triggers the scenario.
Campaign Manager for WebLogic uses a table to keep track of which scenario-specific queries in a placeholder apply to which customer IDs. For example, if Pat Gomes triggers a scenario to place a query in the top-banner placeholder, Campaign Manager for WebLogic stores the Pat Gomes/top-banner-placeholder/scenario-query association in a table in its data repository.
Once a scenario places a query in a placeholder for a specific user, Campaign Manager for WebLogic persists the information until any of the following occurs:
Scenarios can contain multiple actions that place queries in one or more placeholders under different conditions. For example, when Pat Gomes logs in, scenario1 can place queryA in the top-banner placeholder. When Pat Gomes adds a drill to the shopping cart, scenario1 can place queryB in the top-banner placeholder. However, when a scenario engages a scenario action, it can place only one query in a placeholder for a given customer, and the query remains in the placeholder until the scenario replaces it. For example, when Pat Gomes adds a drill to the shopping cart, scenario1 replaces its queryA with queryB.
The Select Duration window is available for any queries that you create after you install Service Pack 1 or later of Campaign Manager for WebLogic, WebLogic Commerce Server, and WebLogic Personalization Server. You access the window as part of creating a query for an ad placeholder. From the New Ad Action window, under Action, click the "until the campaign ends" link. (See Figure 2-1.)
Figure 2-1 Accessing the Select Duration Window
In the Select Duration window, indicate whether you want the query to stop running before the campaign ends by selecting a timeframe or date. (See Figure 2-2.)
Figure 2-2 The Select Duration Window
Because of the persistence mechanism, some actions might leave a scenario query stranded in a placeholder for a specific user, even across multiple sessions on the Web site. For example:
In general, we recommend that for each scenario that includes an ad-placeholder action, you include an additional scenario action that does the following:
This scenario action clears the placeholder from any campaign-specific ad queries each time a customer logs on to the site.
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|