Each event used in a test relies on a metric handler component to describe how the information generated by the event is logged and compiled into reports. Because each event is unique, it has unique reporting and logging requirements so there’s one metric handler component per event. Keep in mind that one metric handler can represent multiple metrics, in fact all metrics that derive values from a given event should use the same metric handler.
ATG Campaign Optimizer comes with several metric handler components by default. For a listing, see Configuring Data Logging. If your metric uses an event that already has a metric handler, configure that metric handler for your metric. Otherwise, create a new metric handler component and configure it accordingly:
Create a metric handler component from one of the following classes:
Use
atg.abtest.metrics.MetricHandler
for events when you want to limit those events limited by conditions. A Register event is a good example of an event that doesn’t use conditions.Use
atg.abtest.metrics.EventConditionMetricHandler
for events (exceptForm
Submission
and Page Visit) that use a condition. For example, a custom event that tracks how many people upgrade from a free site membership to a paid site membership would use a Register event with an upgrade condition.Use
atg.abtest.metrics.ConditionalFormSubmissionMetricHandler
for Form Submission events when you want to track the submissions of a specific form.Use
atg.abtest.metrics.ConditionalPageVisitMetricHandler
for Page Visit events when you want to monitor visits to a specific page.
Configure the properties in your metric handler component provided by the
MetricHandler
class. See About MetricHandler for a list of properties.For components that don’t implement the
MetricHandler
class directly, you need to configure class-specific properties as well. See the section for your component’s class below.
About MetricHandler
The base class, atg.abtest.metrics.MetricHandler
, determines the data that should be logged for a given event. By default, it supports the tracking of data that is common to all tests, such as when a test starts and ends as well as when new or transient users are assigned to a group.
ATG Campaign Optimizer comes with MetricHandler
components, each of which facilitates reporting for a different event type. When you create tests that use events supported by default, ATG Campaign Optimizer automatically uses the appropriate metric handler component and configures it accordingly. For more information about MetricHandler
components, see Configuring Data Logging.
Use MetricHandler
when your metric when the event it uses isn’t limited by a condition. Configure an instance of MetricHandler
with information that’s tailored to your event. Here’s a quick summary of properties by subject matter:
These properties are required:
datasetPath
,eventJMSType
,logDataItemDescriptorName
,segmentNameResourceBundle
, andsegmentNameResourceKey
.If you want to combine information about two datasets in the same log table, see
datasetPropertyName
andsubtractionDatasetPath
.If you record monetary values for your event, see
currencySumProperties
,logCurrencyCodePropertyName
,reportCurrencyCodePropertyName
, andtargetCurrency
.For other number values that require calculation, see
doublesumProperties
andintegerSumProperties
.If you want to count the number of times an event occurs, see
generatedCountProperty
,uniqueCountGeneratedProperty
, anduniqueCountLogProperty
.
Note that this isn’t a complete list of properties supplied by MetricHandler
, but rather a listing of properties for which you are encouraged to supply values:
Property | Description |
---|---|
A map made up of the following: - A - A When you specify a value for this property, you need to provide values to | |
The path to the dataset used to log the particular event. (Required) | |
The property in | |
A map made up of the following: - A - A | |
The type of JMS event to be logged. (Required) | |
The property defined in the When you provide a value to this property, you need to supply a value to | |
A map made up of the following: - A - A | |
The property in the | |
The item descriptor for the log that holds data about this event. (Required) | |
The scenario action to use to record the event. Omitting a value to this property causes the default, | |
A Boolean property that determines if a logging action will be included in test scenarios. Omitting a value to this property causes the default, | |
The property in the | |
The resource bundle that specifies a segment name used in scenarios that record this event. (Required) | |
The resource bundle | |
The property in the | |
The ISO 4217 currency code used for all report monetary values computed by this metric handler. | |
The property in the When you provide a value to this property, you need to supply values to | |
A property in the |
About EventConditionMetricHandler
The atg.abtest.metrics.EventConditionMetricHandler
class extends the MetricHandler
class to allow you to define scenario conditions for your event. For example, rather than tracking the total number of purchased orders with MetricHander
, you can use EventConditionMetricHandler
to monitor how often users register for a certain kind of membership, such as free or paid. The EventConditionMetricHandler
class generates test scenarios that log data only when an event satisfies a condition you define.
To collect data for the event using EventConditionMetricHandler
, create a component of this class in the ACC and provide values to the base MetricHandler
properties as well as to the following EventConditionMetricHandler
-specific properties:
Property | Description |
---|---|
A property for the event. Although an event may have several properties available, To locate the property name for standard ATG events, see the section for your event in the Using Scenario Events chapter of the ATG Personalization Programming Guide. For commerce events, see Appendix C: ATG Commerce Messages of the ATG Commerce Programming Guide. | |
Data type for the value in | |
The value that is compared to the property indicated in the | |
The operator used to evaluate the event property value. (Required) Options include the following: The operator is considered to be unary if it appears in the list defined in | |
An array of single operand operator strings used to evaluate the Set this property unless the condition you want to use is a custom, unary condition. In this case, override the default values in this property by setting it to your custom condition. This means that |
About ConditionalFormSubmissionMetricHandler
The atg.abtest.metrics.ConditionalFormSubmissionMetricHandler
class extends EventConditionMetricHandler
to provide a preconfigured class for FormSubmission
events. You should use this class to configure logging and reporting when you want a test to record when a specific form page is submitted.
Note: Pages that include the form need to be configured to generate events. See the Form Submission Event section of the ATG Personalization Programming Guide for instructions.
When you use this class, create a component and define values for the relevant properties as described in About MetricHandler. The only property provided by ContidionalFormSubmissionMetricHandler
that you need to set is constantValue
. Set constantValue
to the form name for which information will be logged when it is submitted.
The following properties are provided with these default values:
Property | Default Value |
---|---|
| |
| |
| |
|
About ConditionalPageVisitMetricHandler
The atg.abtest.metrics.ConditionalPageVisitMetricHandler
class extends EventConditionMetricHandler
to support PageVisit
events that use a condition. You should use this class when you want visits to a particular page to be tracked (the particular page being the condition). ATG Campaign Optimizer includes a MetricHandler
component called PageVisitMetricHandler
that supports PageVisit
events without conditions: it tracks the total number of pages viewed by test participants.
When you use this class, create a component and define values for the relevant properties as described in About MetricHandler. The only property provided by ContidionalPageVisitMetricHandler
that you need to set is constantValue
. Set constantValue
to the form name for which information will be logged when it is submitted.
The following properties are provided with these default values: