> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracking counters in the Widget Studio

> Add visits, transaction, and products-in-cart counters as dynamic variables in Widget Studio text elements to display real-time social proof data.

A counter fills a text element with a number that Kameleoon tracks, so you don't type the number yourself. Implement [the relevant tracking](https://docs.kameleoon.com/user-manual/product-targeting-and-social-proofing/get-started.md) in your code before you add a counter.

## Available counters

The Widget Studio provides **three built-in counters** that you can use as **custom variables** in any text element:

* **Visits counter:** Shows the number of visits
* **Transaction counter:** Shows the number of transactions
* **Products in Cart counter:** Shows how many products are in carts

> [!NOTE]
>
> Kameleoon supplies the counter values. You set only the starting value, the number format, and the display threshold.

## How to add a counter to your widget

Follow these steps to insert a social proof counter into your text:

1. Open your widget in the **Widget Studio**.

2. Select the **text element** you want to edit.

3. In the text editor, click the **three dots menu** (three vertical dots) and select **Custom variables**.

   ![Text content editor with the three dots menu open, showing Custom variables, Code, Remove formatting, and Expand text editor](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/product-targeting-and-social-proofing/tracking-counters-in-widget-studio/text.png)

4. Use the filter and type **`api`**.

5. Choose the counter you want to insert (Visits counter, Transaction counter, or Products in Cart counter).

   Kameleoon adds the selected counter directly into your text.

## Counter configuration options

You can customize each counter using the following settings:

### Start counting from

Define the initial value from which the counter starts counting.

### Number format

Choose how to display the number, for example as a full number or in abbreviated format.

### Display threshold

Set a minimum value the counter must reach before it appears:

* **Display if more than *X* visits**
* **Display if more than *X* transactions**
* **Display if more than *X* products in cart**

Setting a display threshold lets you hide the counter until it reaches a meaningful number.
