This chapter is written for users who want to create new metrics or want to add additional reporting functionality to existing events. Here’s a check list of tasks that you need to complete when you are working with custom metrics and cross references to procedures that walk you through these tasks.

To create a new metric:

  1. If your metric requires a new event, create it now by following instructions provided in the Adding Custom Events section of the ATG Personalization Programming Guide for instructions. Otherwise, skip this step.

  2. Create a new item descriptor and database table for logging data. See Adding New Logging Content to a Repository and Database.

  3. Add new properties to an existing reporting item descriptor for your metric . Also add new columns to the existing reporting table or a new reporting table. See Adding New Reporting Content to a Repository and Database.

  4. Add a report display label to your resource bundle. Create a new resource bundle, if necessary. See Defining Resource Bundles.

  5. Create a data collection object, mapper, dataset, and queue. See Creating Recording Devices.

  6. Configure a metric handler component to define logging and evaluate log data for your metric. If you are using an event that already has a metric handler component, configure that one. Otherwise, create a new metric handler component and configure it to create your metric. See Creating a Metric Handler.

  7. If your metric requires computations that involve data from more than one metric handler component to compile the report, extend the report property mapper. See Extending the Report Property Mapper.

  8. Configure a Metric info component. If you created a new resource bundle, create a new Metric info component. See Configuring a Metric Info Component.

  9. Configure other components to use your metric handler and Metric info components. See Directing Components to Use Your Logging and Reporting Resources.

To add metrics for an event that is already used in tests:

  1. Add new properties to an existing logging item descriptor for your metric and add new columns to the existing logging database table. See Adding New Logging Content to a Repository and Database.

  2. Add new properties to an existing reporting item descriptor for your metric . Also add new columns to the existing reporting table or a new reporting table. See Adding New Reporting Content to a Repository and Database.

  3. Create a new resource bundle and add a report display label to it. See Defining Resource Bundles.

  4. Copy the existing mapper file used by the event from the /atg/registry/data/mapper directory and add data-listener tags to support the new metric. Add the mapper file to your configuration layer so that it overrides the existing mapper file. If you don’t have one, add it to the <ATG9dir>/home/localconfig/atg/registry/data/mapper directory . For information on mappers, see the Mapper XML Definition Language of the ATG Personalization Programming Guide.

  5. Update the properties in the metric handler component that are relevant for your metric. For a list of metric handler components, see Configuring Data Logging. You can find a description for the metric handler properties in About MetricHandler.

  6. If your metric requires computations that involve data from more than one metric handler component to compile the report, extend the report property mapper. See Extending the Report Property Mapper.

  7. Create a new metric info component and update it with information about your metric. See Configuring a Metric Info Component.

  8. Configure the Report Manager to use your metric info component. See Directing Components to Use Your Logging and Reporting Resources.

 
loading table of contents...