Cheers Widget

Let visitors show appreciation on any page — no account, no cookies, no friction.

What it is

The Cheers widget adds a one-click appreciation button to any page on your site. Visitors tap it to leave a cheer — anonymously, with no account or cookie required. Cheer counts are tracked per page and surface in your Peepmetrics dashboard alongside your normal page view data, so you can see which content resonates most.

Installation

The Cheers widget is loaded by the same cheers.js script. Place a container element where you want the button to appear, then load the script:

<div
  data-peepmetrics-cheers
  data-token="YOUR_TRACKING_TOKEN"
></div>

<script defer src="https://peepmetrics.io/cheers.js"></script>

Replace YOUR_TRACKING_TOKEN with the token shown in your dashboard. You can place the container anywhere in the page body — the script will find it.

Style presets

Set a data-style attribute on the container to choose an icon. Defaults to heart.

Value Icon
heart ❤️
clap 👏
fire 🔥
arrow-up ⬆️
<div
  data-peepmetrics-cheers
  data-token="YOUR_TRACKING_TOKEN"
  data-style="clap"
></div>

CSS customization

All elements rendered by the widget use the pm-cheers class namespace, so you can target them without risk of collision:

  • .pm-cheers-button — the outer button element
  • .pm-cheers-icon — the emoji icon
  • .pm-cheers-count — the numeric count

Deduplication

To prevent accidental double-submission, the widget records a flag in localStorage after a visitor cheers on a page. On subsequent visits the button is shown in an already-cheered state and additional clicks are ignored. Clearing browser storage resets this state — this is an intentional tradeoff that keeps the widget entirely cookie-free while still reducing noise in your data.