# Configuring KPIs

## 📖 Definition

KPIs (or Key Performance Indicators) are metrics that enable you to **measure the performance of an element or a variation** through your end-user journey.\
You need to select a **primary KPI**, which will serve as a **point of reference for the entire feature** and enables you to determine the best-performing variation. You can also select one or several **secondary KPIs**, which are metrics that you want to track, but whose results don’t impact your feature as much.\
All the KPIs you configure can be tracked in the reporting of your feature.

## ⚙️ Configuration

You can either select an existing KPI or create one if it doesn’t exist, among the 4 types of KPIs available:\
\- Transaction\
\- Event\
\- Pageview (on Web/Server)\
\- Screenview (on APP/Server)

| <p>⭐ Good to know</p><p>We recommend implementing the analytics part of Flagship as described in the <a href="https://developers.flagship.io/docs/universal-collect#hits">developer documentation</a> (following your integration type (SDK/API)) before the KPI(s) of your feature.</p> |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

For Screenview and Pageview KPIs, the reporting displays the access rate of a page (Pageview) or screen (Screenview).

### Selecting an existing KPI

You can select a KPI you have previously sent to the data collection.

To do so, select the type of KPI from the first drop-down list and directly select the existing KPI in the ‘Existing’ field or enter the first letters of the KPI.

### Creating a KPI

You can also create a KPI from scratch, i.e. a KPI you haven’t sent to the data collection beforehand.

To do so, select the type of KPI from the first drop-down list and enter the name you want to give your KPI in the *Add new* field. Click + and choose a sub-KPI.

Next, when coding an Event or Transaction KPI, you must enter the exact same name as the one you created manually in Flagship.

| <p>🚩 Heads up</p><p>All conversions displayed in the reporting were made after being assigned to a flag. To be assigned to a flag, follow the activation part of the <a href="https://developers.flagship.io/docs/decision-api/v2#trigger-hit">Decision API</a>/ <a href="https://developers.flagship.io/sdk">SDK</a> you are currently using.</p> |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

##

## 💡 Use case

For example, let’s say you are running an experimentation to test two different algorithms on the search feature of your website.

You may want to track the access rate to the product page as a primary KPI as well as the number of clicks on the *Add to cart* CTA as a secondary KPI.

To do so, apply the following steps:

1. In the *Choose metrics to follow* section of the *Basic information* step, select *Pageview* from the first drop-down list.
2. Enter *Access rate* as a name for the KPI, select *is regular expression* from the operators list and enter a value (for example: .\*\\/product\\/\[a-z0-9]{5}.html).
3. In the secondary KPI section, select *Event* from the first drop-down list and enter *Clicks on Add to cart* as a new KPI.
4. Select *Conversion rate* as a sub-KPI.

**Need additional information?**

Submit your request at <product.feedback@abtasty.com>

Always happy to help!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/flagship-deprecated/steps-configuration/configuring-kpis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
