Metrics

Documents / Data Vista

A metric is a measuring stick — in everyday language, the number you watch to decide if a change helped (more signups, fewer errors, higher revenue). In CROForge, a metric is a reusable success definition stored in Data Vista: which event counts, optional conditions on that event’s properties, how to calculate the number, and whether a higher or lower result is good. You create the metric here, then attach it to one or more experiments. Metrics do not run by themselves; they score events that fire on the site.

Words used on this page

WordEveryday meaningMeaning in CROForge
MetricA measuring stick for success.Event + optional conditions + calculation type + direction. Created under Data Vista → Metrics, then linked on the experiment Metrics tab.
EventSomething that happened.The catalog item the metric listens to (standard click, page view, or a custom purchase event). Chosen by event id when you build the metric.
Event property vs AttributeA property is a field on one happening. An attribute is a trait of a person.Event properties live on the event payload (click text, amount, target URL) and feed metric conditions and “value of event property” calculations. Attributes describe the visitor and feed segments, not metric math.
ConversionThe desired outcome (a sale, a signup, a demo request).What the metric is designed to count or score so the campaign report can compare variations.
Calculation typesHow you turn raw happenings into one number.METRIC_CALCULATION_TYPE: Unique visitor (0), Unique session (1), Event count (2), Value of event property (3).
AggregationCombining many numbers into one (sum, average, first, last).METRIC_PROPERTY_VALUE_TYPE when calculation is Value of event property: First (0), Last (1), Sum (2), Avg (3), Min (4), Max (5).
Direction Up/DownWhether “more” or “less” is the win.METRIC_DIRECTION: Up (0) means higher is better; Down (1) means lower is better (bounce, errors, time-to-complete when less is good).
Standard vs CustomShipped vs workspace-made.Same split as attributes and segments. Custom metrics are the ones you typically attach to campaigns.
Condition AND logicEvery rule must pass together.Every metric condition must pass for that event before it contributes to the metric.
PAGE_URLThe address of the page.Can appear as a URL-typed event property with include/exclude packs, so only events on the right pages count.
Data VistaThe data library / view.Home of metric definitions. Experiments only link to metrics created here.
ImpressionBeing shown something (an ad impression, a variation shown).A separate runtime event that a visitor was assigned or shown a variation. Metrics usually listen to clicks, page views, or custom conversions — not to impression itself — but matching metrics still receive live experiment context.

Screenshot filename: metrics-list.png. Paste this page into the WordPress Code editor, then insert that screenshot from the Media library. Do not use a Markdown image tag.


What a metric defines

Every metric answers four questions:

  1. Which event counts (for example a standard click, or a custom purchase event).
  2. Optional conditions on event properties (button text is “Book Demo,” amount between 100 and 200, page URL include/exclude).
  3. How to calculate (unique visitors, unique sessions, event count, or an aggregated property value).
  4. Direction — Up means higher is better; Down means lower is better.

Create the metric under Data Vista → Metrics, then attach it on the experiment. One clear primary metric avoids conflicting “winners.” Secondary metrics (if you attach more than one) should explain the story, not compete with the primary.

Categories

Standard vs Custom — the same pattern as attributes and segments. The left sidebar lists both groups; the right panel shows details. Create and edit use a modal (name, description, event, metric type, direction, conditions). Delete asks for confirmation. Standard metrics may ship with the product; custom metrics belong to the workspace.

Calculation types

Stored as METRIC_CALCULATION_TYPE. Product copy often shows the enum name with underscores replaced by spaces (for example UNIQUE VISITOR).

NameValueEveryday meaningMeaning in CROForge
Unique visitor0Count each person once, even if they click ten times.For each visitor, count only one matching event. Best for “did this person convert?”
Unique session1Count each visit once.For each session, count only one matching event.
Event count2Count every time it happened.Count every matching occurrence. A visitor who clicks three times contributes three.
Value of event property3Add up (or average) a number on the event, such as revenue.Aggregate a numeric event property using First / Last / Sum / Avg / Min / Max. Requires an event property id and a property value type.

Property aggregation

Used only when calculation = Value of event property (METRIC_PROPERTY_VALUE_TYPE):

NameValueEveryday meaning
First0From each visitor, use only the first occurrence of the property.
Last1From each visitor, use only the last occurrence.
Sum2Add every matching value (typical for revenue).
Avg3Average of matching values.
Min4Smallest matching value.
Max5Largest matching value.

Direction

NameValueWhen to use it
Up0Default. Clicks, purchases, signups — more is better.
Down1Bounce, errors, or any measure where less is the win.

Conditions on metrics

Without conditions, every firing of the chosen event counts. Conditions narrow that to the conversion you actually care about. Each condition picks an event property, a match type, and a value. All conditions must pass (AND).

Examples:

  • Click text exact ["Book Demo"] — only that CTA, not every click on the page.
  • Target URL exact match for the contact page.
  • Amount between 100 and 200.
  • PAGE_URL include/exclude pack so the same event on other pages is ignored.

Match types follow the property’s data type (text, number, boolean, URL). URL properties use include/exclude rule packs, the same idea as experiment page targeting.

Linking to experiments

  1. Ensure the metric exists under Data Vista → Metrics.
  2. Open the experiment → Metrics.
  3. Add / link metrics (primary plus secondary if you use more than one).
  4. Save.

Align the metric’s event with the change you are testing: a CTA test should measure clicks on that CTA, not every page view.

What happens at runtime

When an event is sent, Smart Code finds matching metrics and attaches [experimentId, variationId] pairs for live experiments. Matching typically requires:

  • The metric’s event apiName equals the fired event name (case-normalized as implemented).
  • Every metric condition passes.
  • The metric is linked to an experiment that currently has a live variation id.

That context is what lets reports credit the correct variation. Details live in the event pipeline documentation.


Related reading