An anonymous user is someone who visits your portal without logging in. Working with anonymous users can be limiting because you have less information about them. However, you can use tracking tools to find out more about these users, such as the date and time they visit and information in the request or session.
Anonymous user tracking can help you present personalized content to an anonymous user over multiple sessions. For example, you can set up visitor entitlement, delegated administration, and some types of personalization based on that information. Anonymous user tracking gives anonymous users records in a database, where you can store meaningful information about them, such as personal preferences.
Developers use WorkSpace Studio to programmatically set up anonymous user tracking. You cannot use the Administration Console to set up anonymous user tracking.
Note: | Campaigns and behavior tracking are not supported for anonymous, non-trackable users. For more information on targeting a Campaign to tracked anonymous users, see the Interaction Management Guide. |
This chapter includes the following sections:
WebLogic Portal lets you identify and retain information about non-authenticated visitors to your portals. When you enable anonymous user tracking, non-authenticated users receive a cookie after a predetermined time (the default is 30 seconds), and preference information is persisted in a database rather than in memory.
Each time an anonymous tracked user returns to your portal, the ID in the cookie matches the primary key in the tracked anonymous user database, the previous user properties are maintained, and your personalization and campaign rules work for this user. When an anonymous tracked user registers in your portal, the user profile is moved from the anonymous tracked user database to the user database.
If users do not have cookies enabled or if they delete cookies frequently, there is no way to match the users with their existing records in the anonymous tracked user database, and on subsequent returns to the portal these users are treated as new anonymous users.
Anonymous user tracking can be customized to exclude users who spend less than a designated period of time on your site, avoiding the expense of storing data on irrelevant users.
This section includes the following topic:
WebLogic Portal supports the following types of user tracking profiles:
AnonymousProfileWrapper
is converted to a TrackedAnonymousProfileWrapper
), and a cookie with a randomly-generated ID is placed in the user's browser. That ID is used as the primary key for the user's profile, so when the session ends, the user's properties are persisted and are available for the next visit. If a tracked anonymous user returns, the tracking ID in the user's cookie is used to retrieve the user's tracked data from the database. That data can be used to enable personalization and run campaigns against the user. (If a trackable anonymous user does not remain at a site longer than the specified duration, neither the cookie nor the tracked anonymous profile are created.)Note: | If the user deletes the cookie, the cookie's tracked anonymous user data remains in the database. |
ProfileWrapper
is not yet created.
You must configure anonymous user tracking by editing the web.xml
file in your web application directory in WorkSpace Studio. You will enable cookies on the user's browser in order to track anonymous users. You must also enable anonymous user tracking for your portal, because the tracking is not enabled by default.
You can target a Campaign to tracked anonymous users. For instructions, see Targeting a Campaign to Tracked Anonymous Users in the Interaction Management Guide.
When you configure anonymous user tracking, you perform the following tasks:
To edit the web.xml
file to enable anonymous user tracking:
web.xml
file in the /WEB-INF
directory of your portal web project.web.xml
file so you can edit it in WorkSpace Studio.web.xml
file. Adding this PortalServletFilter
component turns on anonymous user tracking in your Campaign. <filter>
<param-name>enableTrackedAnonymous</param-name>
<filter-name>PortalServletFilter</filter-name>
<filter-class>com.bea.p13n.servlets.PortalServletFilter
</filter-class>
<init-param>
<description>Option to track anonymous users, defaults to false
if not set. 'createAnonymousProfile' is ignored if this is
true</description>
<param-value>true</param-value>
</init-param>
<init-param>
<description>Length in seconds visitor must be on site before we
start tracking them. Defaults to 60 seconds if not set
</description>
<param-name>trackedAnonymousVisitDuration</param-name>
<param-value>60</param-value>
</init-param>
</filter>
trackedAnonymousVisitDuration
parameter value to the number of seconds before tracking begins. During testing, set the trackedAnonymousVisitDuration
in Listing 7-1 to a small number (for example, 5) so that your sessions quickly switch to tracked sessions.createAnonymousProfile
parameter value to true
, as shown in the following code sample. <init-param>
<param-name>createAnonymousProfile</param-name>
<param-value>true</param-value>
<description> Filter will create an anonymous profile for every
session. Defaults to true if not set</description>
</init-param>
The default is true
. To disable the creation of anonymous user profiles, set the value to false
. If the enableTrackedAnonymous
parameter is set to true
, the createAnonymousProfile
parameter is ignored.
Note: | The createAnonymousProfile parameter does not enable anonymous user tracking from one session to the next without registering; this would require the enableTrackedAnonymous value to be changed to true . If a user visits your site and then registers within the same session, any data collected on that user is persisted in the account of that registered user. |
web.xml
file.PortalServletFilter
setting in WorkSpace Studio by right-clicking the web.xml
file, choosing Compare With > J2EE Library Version, and double-clicking p13n-web-lib in the Compare editor. The editor shows the p13n-web-lib version in one of the panes.Tip: | Tracking anonymous users can potentially generate a large amount of data. You might want to develop a strategy to remove old data. For example, you could delete entries from the database that are older than two months. If a tracked anonymous user is converted to a registered user, you could remove the tracked anonymous user EJB and its associated property set EJBs from the database. |
You can target anonymous non-tracked users with personalized content using a personalization tool, such as default (non-campaign) placeholders and content selectors. Campaigns and behavior tracking are not currently supported for anonymous, non-tracked users.
Tip: | Campaigns and behavior tracking are not supported for anonymous users that have not logged in. |
The difference between completely anonymous non-tracked users and registered or anonymous tracked users is how long their profile information is retained.
For example, if an anonymous user visits a portal and sets preferences to favorite color=purple
and favorite hobby=reading
, those values are persisted in memory and can be used to display personalized content and trigger campaigns while the browser session lasts. However, if the user closes the browser and revisits the portal, the user preferences must be re-entered. Registered and anonymous tracked user preferences are saved in a database.
While anonymous users might not retain a consistent store of user preferences from session to session, you can still provide some Interaction Management functionality. Many personalization conditions are based on generic HTTP session and request properties that you define, dates and times, or personal session preferences that have no relationship to registered users and their profile properties. For example, you could display personalized content for anonymous users accessing your portal with a specific type of browser during a specific time frame.
See the Interaction Management Guide for instructions on setting up placeholders and content selectors for anonymous non-tracked users.