A profile marker is a marker RepositoryItem that attaches to a user profile. Use profile markers when you want to “mark” a user’s profile with some information. A user might perform some action, for example, navigate to your site by way of an advertisement on another site. If you were to create a mechanism that extracts the site name and advertisement ID from the URL, when the user browses to your site, that information could be stored in a marker on the user’s profile. Any markers added to a user’s transient profile will be copied to his or her permanent profile automatically when he or she registers or logs in. You can design your site to tailor its appearance or behavior based on the profile markers in a user profile. You can also gather data that could be used for comparing the number of users diverted to your site from specific partner sites in order to determine which partner is most helpful to you.

Another use of profile markers is demonstrated in the business process tracking feature included in ATG 2007.3. Each business process is made up of stages. When a user reaches a stage, a marker is assigned to his or her profile. For more information, see Defining and Tracking Business Processes.

This chapter describes how to work with profile markers, which are markers assigned to profiles. Markers can be assigned to any RepositoryItem as long as that RepositoryItem has a property for holding markers, a Marker Manager component configured appropriately, and mechanisms are in place for adding, removing and locating markers.

You can store any information in a profile marker that’s relevant to your application. Each profile marker has several properties, the most important of which are key, value and data. You should use these properties to hold string values that define the marker or represent the particular circumstances in which the marker is assigned.

The key property distinguishes one kind of profile marker from another. Consider the example described above about the user who browses to your site from a partner site. In this instance, a key might be set to partner and value to travelSiteA. It’s a good idea to think of the key as a marker type, which will be used as an organizing principle for the marker data you are collecting. The key property might be a superset of the value.

Similarly, the data property might be a subset of value. The data property might hold a request parameter specifying the particular banner link on travel site A that directed the user to your site. To find a particular marker on a profile, you provide its key (partner), value (travelSiteA) and data (image2399), although if you are looking for any marker with a specific key, you need only provide that key.

Assigning a marker to a profile is one way to store non-standard information in a profile; the other way is to create custom profile properties. Custom properties typically hold one piece of data, meaning you’ll need one custom property for each type of data you want to store. When you use markers, several can be stored in one profile property. Markers have keys, each of which can signify a specific application purpose and are used when sorting markers Also, there are several conditions, actions, events, and servlet beans designed to create, locate, and remove markers from profiles in an efficient process. Unless the information you gather is simple and limited to one purpose, in most cases you should use markers instead of creating custom properties.

Here’s how profile markers work:

  1. Configure a Profile Marker Manager. When a scenario determines that a profile marker needs to be created, the scenario prompts a Profile Marker Manager to create a marker instance and assign it to a particular profile. The Profile Marker Manager facilitates all interaction between markers and profiles, such as creating markers and removing them from profiles as well as querying profiles for specific markers.

    See Configuring the Profile Marker Manager.

  2. Create one or more scenarios that define when markers will be created and attached to a profile. Rather than creating a scenario for this purpose, you can code a JSP to use a servlet bean that accomplishes the same task.

    See Marking a User Profile.

  3. Once you have marked profiles, your application can check profiles for specific markers or use scenarios that respond based on the markers in a profile. Create scenarios (or use servlet beans) for this purpose.

    See Using Marked Profiles.

  4. To ensure optimal performance, it’s a good idea to create scenarios (or use servlet beans) that remove markers when you no longer need them.

    See Removing Profile Markers.

For information on how to accomplish these tasks directly through the API, see the atg.markers package in the ATG API Reference.

loading table of contents...