This post is to present the steps for creating a Campaign in Weblogic Portal that illustrates some vague points about it.
The campaign target is to show an advertisement in a placeholder, within some interval(start & end dates), with some goals to be reached before the end date of the campaign.
Campaign goals are set against content clicks or impressions (views) count. This count can be calculated based on the clicks/views of the specific content that is displayed in the campaign, or if the content is viewed/clicked outside the campaign. Also, the count is checked for each content count or the summation of the contents’ count in the goal.
For example, a campaign is to show some advertisements on the ads area of the portal, on IPhone should display 5 different contents. Each content is displayed in its place based on the queries defined in the placeholders in the portal, content selectors or Content Presenter Portlet. The goal of the campaign is to reach 1,000,000 clicks on the 5 contents/ads. So, the goal is to check on the summation of the 5 content paths added to the campaign goal.
The campaign should target females only. So in the data sync project, we create a gender property in the default profile, GroupSpace profile, and make it restricted multi-value property, with two values (male or female). Then, define a user segment that filters the users based on the gender profile property to equal “female”.
Campaign Content Action
We can now add a new scenario to the campaign, and drag the segment condition on it, then assign it to be the “females” segment. Now, we need to define the action. Here we create two actions to be performed. First, we need to place a specific content on a placeholder(suppose that the place holder by default shows the logo of the company). We drag the “place content” action, and assign a query to this action that retrieve the content to be placed, then select the place holder, that to be replaced its content with the content retrieved.
Campaign Calling Method Action
Second, we need to call a static method in a Class. When I tried this, I created a class in the Web project and I was getting an exception that the class is not found. I didn’t read carefully that I need to make this class “application-scoped” class by creating a Library Project (JAR) and add it to the EAR project, to expose all the classes in this library to the portal project. Then, we drag the “call static method” action on the campaign, then enter both the method name & the type of the class.
The campaign works fine, but there is something bothered me. When I made the campaign has a goal of X clicks on a content, I didn’t notice that the count is not resting when I redeploy, the count persisted in the database. But I needed someway to monitor how many clicks so far on the content and debug if the campaign goal is reached successfully or not.
I used PointBase console and looked around the tables in the “weblogic” scheme, till I found the table named “AD_COUNT“. It contains the column “AD_ID” which represents the path of the ad, a column that represents the Portal Application, a column for the view count, and another for the clicks count. Also, I found that the whole content in the WLP Repository goes in the table CM_NODE & CM_PROPERTY. The funny thing about PointBase console that it interprets the binary column and display the content image inside it. Check the screenshot :
Weblogic Portal Campaigns is a powerful feature that lets you provide personalized content on the portal, with predefined goals, targeting specific segment(s) of users. It enables the portal to be dynamic to adapt with market changes by changing the parameters of the campaigns in run-time, choosing which content to be displayed to which segment till the campaign goal is reached or the campaign due date comes. It integrates with Weblogic Virtual Content repository.
A feature it lacks is enabling the campaign to end based on goals other than content views/clicks only, like checking against an inventory of the limited product items(which may require calling some back-end method or web service) to flag the campaign as ended. Also the documentation lacks many details about features found in the development IDE (Eclipse packed with OEPE) which make it hard to exploit all the features of Weblogic Portal Campaigns.
For further details, you can refer to the Oracle documentation of Building a Campaign in Weblogic Portal 10.3.2