CDPGuidesSupport

Element Labels

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

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:

<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, 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

How is this guide?

On this page