---
title: Total value and other numeric metrics
slug: experimentation-strategy/docs/total-value-and-other-numeric-metrics
docTags: 
createdAt: 2026-08-05T20:33:27.371Z
---

- Optimizely Web Experimentation
- Optimizely Personalization
- Optimizely Performance Edge
- Optimizely Feature Experimentation
- Optimizely Full Stack (Legacy)

Optimizely's total value metric is a flexible numeric metric that lets you track actions beyond conversions and revenue in Optimizely Experimentation and Optimizely Personalization. As long as it is quantifiable, you can use total value to track it.

:::hint{type="info"}
**Note**

See [use cases for the total value metric](docId\:LC7AIR0tBH6owjM51i9Hz).
:::

## Add the tracking call in Optimizely Web Experimentation and Optimizely Personalization

You must add some JavaScript to your experiment or campaign when using total value as your numerator. When you are ready to add code, use the reserved `value` tag.

Add a small code snippet to your site to call the [\`event\`](docId:1okSTW6eZjYr1urn1-xpr) tracking API. Place this code on the pages where the event occurs.

```javascript
window["optimizely"] = window["optimizely"] || [];
window["optimizely"].push({
  "type"     : "event",
  "eventName": "Videos Watched",  //this refers to the API name of the event
  tags"      : {
                 "value": 4                   
               }
});
```

## Add the tracking call in Optimizely Feature Experimentation

In Optimizely Feature Experimentation, include the reserved [\`value\`](docId\:Y8SgTH0P-7HSO9dfjQbVx) tag when tracking an event. The following code shows an example of what it might look like if you use the Optimizely Feature Experimentation JavaScript SDK.

```javascript
var eventKey = "Videos Watched";     
var userId = "auser@adomain.com";

var attributes = {
  DEVICE: "iPhone"
};

var eventTags = {
  category: "videos",
  value: 4                     
};

// Include revenue among other event tags when submitting Events
user.trackEvent('my_purchase_event_key', eventTags);
```

## Value metrics and revenue metrics 

:::hint{type="warning"}
**Important**

You should not use **total value** metrics to track monetary values.
:::

Unlike [revenue metrics](docId\:Tfs7x7ZmcKDsfS3nXhS3V), which use [fixed-point numbers](https://en.wikipedia.org/wiki/Fixed-point_arithmetic), numeric metrics use [floating-point numbers](https://en.wikipedia.org/wiki/Double-precision_floating-point_format). For example, $72.81 would be submitted as 7281 with `revenue` but as 72.81 with `value`. Due to the dynamic precision of floating-point numbers, aggregations for numeric metrics are [susceptible to rounding](https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems). You must use the revenue metric to prevent these rounding errors when tracking monetary values.
