---
title: "Counter.add(value, [tags]) | Grafana k6 documentation"
description: "Add a value to the Counter metric."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Counter.add(value, \[tags])

Add a value to the `Counter` metric.

Expand table

| Parameter | Type   | Description                                                                                                                                                                                      |
|-----------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| value     | number | The value to add to the counter.                                                                                                                                                                 |
| tags      | object | Set of [tags](https://grafana.com/docs/k6/v2.3.x/using-k6/tags-and-groups/) that will be tagged to the added data point (note that tags are added per data point and not for the entire metric). |

[Counter examples](https://grafana.com/docs/k6/v2.3.x/javascript-api/k6-metrics/counter/#examples)
