# Element Labels

> Use the data-heatmap-id HTML attribute to add stable, privacy-safe labels to elements in your heatmap data.

Source: https://docs.oursprivacy.com/docs/heatmaps/data-heatmap-id

By default, heatmaps identify elements by their tag name, role, and position in the page. This works well for most cases but can produce generic labels for repeated elements.

Add `data-heatmap-id` to give important elements a stable, human-readable label:

```html
<button data-heatmap-id="signup-cta">Sign Up Free</button>

<a href="/pricing" data-heatmap-id="nav-pricing">Pricing</a>
```

These labels appear in hotspot drilldowns, the [per-element click ranking](https://docs.oursprivacy.com/docs/heatmaps/reading-heatmaps#rank-clicks-by-element), and CSV exports. No element text is captured, only the label you provide.

***

## When to Use It

* **Key CTAs:** signup buttons, checkout buttons, primary conversion points
* **Repeated elements:** "Add to Cart" buttons in a product list where position alone is ambiguous
* **Dynamic elements:** buttons whose text or position changes (A/B test variants, personalized content)

***

## Naming Tips

* Use descriptive names: `signup-cta` not `btn1`
* Use consistent prefixes for related elements: `nav-pricing`, `nav-features`, `nav-about`
* Don't include PII or sensitive data in the label

***

## Next Steps

* [Reading a Heatmap](https://docs.oursprivacy.com/docs/heatmaps/reading-heatmaps): see your labels in the per-element click ranking and exports
* [Heatmaps Overview](https://docs.oursprivacy.com/docs/heatmaps): the four heatmap types and how they connect to session replay
