ATG Personalization Features: User Profile

One of the power features of ATG is the personalization module, here is a quick list of the available features:
1) Internal and External User Profiles:
The default external user profile repository is /atg/userprofiling/ProfileAdapterRepository,
which is defined by the userProfile.xml file located in <ATG9dir>\DPS\config\profile.jar. Each
ATG application that adds properties to the external user profile stores its userProfile.xml file in an
ExternalUsers sub-module.
Internal profiles are stored in the /atg/userprofiling/InternalProfileRepository, defined by the
internalUserProfile.xml file in <ATG9dir>\DPS\InternalUsers\config\config.jar.
A parallel set of database tables also exists for internal user profiles. Where the user item in the
ProfileAdapterRepository references the dps_user table, the user item in the
InternalProfileRepository points to a dpi_user table, and so on.
You can extend/replace and customize the userProfile.xml using the same way as any repository.
In ATG, you can configure the profile to use SQL or LDAP or both.
By changing : /atg/userprofiling/ProfileTools into :
profileRepository=/atg/adapter/ldap/LDAPRepository
The LDAP is based on view, object and classes:
<!– user view –>
<view name=”user” default=”true”>
…..
<!– object classes –>
<object-class>top</object-class>
<object-class>person</object-class>
<object-class>organizationalPerson</object-class>
<object-class>inetorgPerson</object-class>
<!– properties –>
<property name=”login” ldap-name=”uid” data-type=”string” required=”true”>
<attribute name=”unique” value=”true”/>
</property>
<property name=”password” ldap-name=”userpassword” data-type=”string”
required=”true”
editor-class=”atg.beans.PasswordPropertyEditor”/>
Whenever a user accesses a site that uses the Personalization module, two different mechanisms are used
to track the user’s actions:
• A session is created for the user, and is maintained either through a cookie or through
URL rewriting.
• The user is associated with a profile.
To change the secret key that the Personalization module uses to hash the user ID cookie, edit the
following property of /atg/userprofiling/CookieManager:
cookieHashKey=
Profile Form Handlers:
-handleCreate: Creates a new permanent profile and sets the profile attributes to the values entered in the form.
-handleUpdate Modifies the attributes of the current profile.
-handleLogin Uses the login and password values entered by the user to associate the correct profile with that user.
-handleChangePassword Changes the password attribute of the profile to the new value entered by the user.
-handleLogout Resets the profile to a new anonymous profile and optionally expires the current session.
Access Control
Control access to some or all of the pages on the site.
AccessControlServlet (/atg/userprofiling/AccessControlServlet):
Configurations:
$class=atg.userprofiling.AccessControlServlet
enabled=true
# Nucleus path of the Profile object
profilePath^=ProfileRequestServlet.profilePath
# List of mappings between paths and AccessController objects. If a
# path refers to a directory, all the documents in that directory and
# its subdirectories will be protected by the given AccessController.
accessControllers=\
/docs/members=/your/path/MemberAccessController,\
/docs/members/preferred=/your/path/PreferredMemberAccessController
# List of “access allowed” event listeners
# accessAllowedListeners=
# List of “access denied” event listeners
# accessDeniedListeners=
# The URL to redirect to if access is denied. If the AccessController
# supplies its own deniedAccessURL, it will overwrite this value.
deniedAccessURL=http://yourserver/noaccess.html
*RuleAccessController
This implementation of AccessController performs access control based on a set of rules, specified via the service’s ruleSetService property. For example, suppose there is a RuleSetService named
FemaleRuleSetService, configured with the following rule set:
<ruleset>
<accepts>
<rule op=eq>
<valueof target=”Gender”>
<valueof constant=”female”>
</rule>
</accepts>
</ruleset>
Set the ruleSetService property of the Access Controller to point to
FemaleMembersRuleSetService. The user will be allowed access only if she is in the Female profile
group. Here is the example configuration:
$class=atg.userprofiling.RuleAccessController
enabled=true
# Rules used to determine whether access should be allowed
ruleSetService=/your/path/rules/FemaleRuleSetService
# URL to redirect to if access is denied
deniedAccessURL=http://yourserver/femaleAccessOnly.html
2) Targeting Content:
Creating Rules for Targeting Content:
Example:
<rule op=eq name=”Rubber sector”>
<valueof target=”industrySector”>
<valueof constant=”rubber”>
</rule>
Type:
Accept Rules
Reject Rules
Sorting directives
<ruleset>
<accepts>
<rule …> … </rule>

</accepts>
<rejects>
<rule …> … </rule>

</rejects>
<includes>
<ruleset src=…> … </ruleset>

</includes>
<sortby>
<sortbyvalue …>

</sortby>
</ruleset>
Setting Up Targeting Services:
To set up a RuleSetService for your rule set, create an atg.targeting.RuleSetService component.
This component can reference a rules file, or it can itself include your targeting rules as a property
So either
-rulesFilePath:If your Rule Set Service refers to a rules file, set this property to the file path of the rules file. This path can
be an absolute path or a relative path starting from your <ATG9dir>/home directory.
-ruleSet=xml rules structure
** Targeter Example: calling slot from targeter
<dsp:droplet name=”/atg/targeting/TargetingFirst”>
<dsp:param name=”targeter” bean=”/atg/registry/slots/aricleSlot”/>
<dsp:param name=”howMany” value=”1″/>
<dsp:oparam name=”output”>
<dsp:a href=”http://5.cdn.blog.com/wp-admin/articleDetails.jsp”>
<dsp:param name=”itemId” param=”element.id”/>
…..
…..other retrived parameters ….
…..
</dsp:a>
</dsp:oparam>
</dsp:droplet>
Targeted E-mail:
You can use the Targeted E-mail services included with the Personalization module to compose and deliver e-mail using the same profile groups and targeting rules you use to deliver content on your Web site.
You create targeted e-mail using the:
atg.userprofiling.email.TemplateEmailInfoImpl class.
This class draws the message body of an e-mail from a page template, invokes a MessageContentProcessor component to process the content, and then passes the resulting JavaMail object to the TemplateEmailSender component, which sends the message. The properties of a TemplateEmailInfoImpl object store values that are specific to an individual e-mail campaign, so you should create a separate instance of this class for each campaign.
*key properties of the TemplateEmailInfoImpl class:
templateURL
messageFrom
messageTo
contentProcessor:MessageContentProcessor responsible for processing the message content; Default: /atg/userprofiling/email/HtmlContentProcessor another valid value is SimpleContentProcessor
The HtmlContentProcessor can be further configured according to the needed formatting.

No comments:

Post a Comment