Metric are values created by computing values in the log database tables and storing those values in the reporting database tables. You need to define reporting resources that hold these computed values.

Once you have determined the metrics you want to display in the ATG Campaign Optimizer Results tab, you can define properties/database columns that hold the relevant data. There are three pieces of data that must exist as reporting properties/columns:

You may find that your metric requires computations that use data from multiple metric handlers. Use the report property mapper to handle these computations and for others, such as those that calculate averages, that are quick to compute. The report property mapper calculates its values when a user requests to view the Results tab and discards these values afterwards. Although log data for such metrics is kept in the ABTestLogRepository, the reporting data is not persistent and so it is not held in ABTestReportRepository.See Extending the Report Property Mapper for information.

For example, if you want to see a total number of times test users view a Member Benefits page, you would define a property called MemeberBenefitsPageVisits in ABTestReportRepository testReportGroup item descriptor and provide a similar column name to a database table that holds page visit information. Similarly, MemeberBenefitsLog is added as a table to the logging database table and an item descriptor to ABTestLogRepository. Each time a report is generated, a total count is calculated based on information in the log database.

MemberBenefitsPageVisits holds a singular value, but you want to know how many times in total a page is viewed. You need to indicate that some value needs to be tallied. To do this, you set the metric handler generatedCountProperty property to the property the property you added to the MemeberBenefitsPageVisits property in the testReportGroup item descriptor. The metric handler component also provides properties for adding property values together. See About MetricHandler for more information.