The first step to using Analytics functionality in a custom application is deciding which events are useful and what information you want to track. The Analytics database uses a standard star schema, providing almost unlimited flexibility in data storage.
#1: User interest statistics
Palo Alto Golf Course (PAGC) is setting up new classes and wants to see which topics users are most interested in. They decide to post a portlet listing three problem-specific articles on Golf Digest's Web site and track which of the links users click on the most. They also want to track users' skill levels since it is defined as a user property in their portal. Since the users are divided among three portal groups, PAGC also wants to track the users' group membership.
Solution: PAGC creates a portlet that displays links to the three articles. Each link points to a redirect page that calls the sendEvent method in the OpenUsage API, passing the event type ID for that page, the date-time, and user ID. The redirect page redirects to the actual link target. An administrator registers a custom event for the article click in Analytics Administration, along with the corresponding event parameters (event type ID, date-time, and user ID). The user ID parameter corresponds to the existing portal user dimension table, which includes skill level and group membership. PAGC creates a report that displays which links were clicked most often, grouped by skill level or portal group.
# 2: Customer follow-through statistics
BMW is working on a portal application for ordering car accessories online. The application allows users to browse a catalog of items, view details, add the items to a shopping cart, and purchase the items added to the cart. BMW would like to track the following statistics: Number of times a user clicked to browse the catalog. Number of times (by item) a user selected to see each item's detailed description. Number of shopping cart sessions initiated. Number of times (by item) each item was added to a shopping cart. Number of times (by item) each item was converted into an order.
# 3: Content repository usage statistics
Netformx Software has a knowledge base search portlet on its support page that allows users to search for a term in user manuals, articles, marketing material, and/or white papers. Netformx would like to know which of these four repositories is searched the most via the portlet.
Solution: The portlet calls the OpenUsageAPI when the Search button is clicked, passing in the appropriate knowledge repository as the event parameter. If more than one repository was selected, an event is sent for each selected repository. If the portlet uses either the ISearchEvent or the IDirView interface to raise a standard portal event, there is no need to register a custom event in Analytics Administration. Netformx creates a report to compare usage of the four repositories.
# 4: Advertising campaign statistics
Solution: As with the other examples, all events can be sent via an OpenUsage API call with appropriate parameters. Page visits can be tracked using OpenUsage tags. An administrator registers any custom events and custom event parameters in Analytics Administration. A range of reports can be created to display statistics from the campaign.