Metrics
Overview
Metrics measure the actions you want to optimize in your content or Experiences through track events. They are available to customers of Contentful Analytics and Contentful Personalization.
Examples include tracking the number of newsletter signups, form submissions,order quantities, the purchase revenue that a user generates, time spent on an activity, or scrolling to a specific position on a page.
A metric starts capturing incoming track events once it is set up. You can then select that metric to evaluate your personalization’s performance in Experience Insights or analyze your content’s impact in Contentful Analytics.
You can set up your metrics from the “Optimization” tab of the organization settings. For more information, see Set up metrics.
Important: Only organization admins or developer roles have access to the “Optimization” tab in the organization settings.
About metrics
Metric type
Each metric has a type, chosen based on what you want to measure.
Type | Useful for measuring | Example |
|---|---|---|
Binary | One-time actions per user | Form submissions |
Count | Regular actions per user | Button clicks |
Currency | Monetary values | Purchase value |
Time | Duration of engagement | Time spent on a page |
Other | Custom-defined values | User rating |
Binary type (Binomial)
The Binary metric type measures whether an event happens. Outcomes are two distinct states, such as success/failure, yes/no, true/false.
Use it to track actions with clear result, such as:
Users who sign up for a newsletter.
Users who submit a form.
Users who make at least one purchase.
This metric type is best for analyzing whether an action occurs, not how often it occurs.
Count type
The Count metric type measures how many times an event occurs. It is useful when an action can happen multiple times per user or session, and each occurrence matters.
Use it when optimizing for:
Average number of button clicks per visitor.
Average number of items added to a shopping cart.
Average number of views of a specific page.
This metric type helps you understand engagement frequency and user interest in specific aspects of your site or product.
Currency type
The Currency metric type measures actions involving money. Use it when conversion value is best expressed financially, such as:
Average purchase value per visitor.
Average order value per visitor.
Average shipping cost per visitor.
The Currency metric type provides insight into the financial value (or cost) generated by user activities, making it a useful tool for businesses focusing on ROI, revenue optimization, and financial growth.
Time type
The Time metric type measures durations or intervals, capturing how long users engage with elements or areas of your website or application. It helps identify where user interest is sustained or lost, for example:
Average time spent on a specific page or the site overall
Time spent in a checkout flow or step
Other value type
The Other value metric type measures values that do not fit into currency or time categories. It captures specialized or custom user interactions, such as:
Order quantity: Number of items purchased in one transaction.
Survey scores: Ratings users give in feedback forms.
Points earned: Reward points gained for certain activities.
Event name
The Event name identifies the specific name of the track events sent to Contentful. Choose a descriptive name such as “Newsletter Signups” or “Basked Size”. We recommend sending track events before setting up a corresponding metric. This allows the user interface to suggest the correct event name via auto-complete and helps avoid incorrect references. However, you can define any event name, even for events that will be sent in the future.
Event property
For currency, time and other value metric types, you must specify the event property that holds the relevant value.
For example, a purchase event can have multiple properties, such as, revenue, shipping_cost and order_quantity.
NOTE: As with the event name, we recommend sending events before creating metrics. If you want to analyze multiple properties of the same event, simply create multiple metrics.
Attribution window
The attribution window defines how long a conversion is attributed to having viewed content or an Experience. Set the attribution window based on how long you expect the (personalized) content to influence a user.
Contentful offers to attribute a conversion to content or an Experience if it was seen:
Within the same session
Within the same day
Within X days (up to 90 days)
Here are a some examples for choosing the right attribution window:
Same session: An Experience showing a CTA that prompts users to visit a specific page likely affects only that session. Track "button clicks" using a "within the same session" window.
Same session: An Experience suggesting complementary items to what’s already in a user’s basket contributes to purchase revenue in the same session. Attribute "purchase revenue" only to Experiences within the same session.
Same day: If you expect users to visit your content multiple times a day and make multiple conversions, attribute conversions "within the same day".
30 days: If your content or Experiences encourage form signups over multiple sessions, attribute "form submission"conversions "within 30 days".
Sometimes, it makes sense to analyze a single metric across different attribution windows. To do so, create multiple metrics with identical configurations but different attribution windows.
NOTE: Contentful Personalization uses the "last touch" attribution model combined with the selected attribution window. Each Experience is attributed individually. For example, if a single user views multiple Experiences and then converts within the selected attribution window, each Experience is fully credited for the conversion.