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

> ## Agent Instructions
> CrispStats is a hosted, privacy-first web analytics product. It has no self-hosted edition, no session replay, no heatmaps, no A/B testing, no mobile SDKs and no data import except a site's history from a Plausible export (Settings, Import and export).
> The script global is crispstats(...), site keys start with cs_pk_ and secret API keys start with cs_sk_. The script is served from https://in.crispstats.com/d.js and the REST API lives at https://crispstats.com/api/v1.
> There is no npm package to install. Integrations copy the script tag, the queue stub, crispstats.d.ts and proxy code from these docs or from Settings, Tracking code in the dashboard. A first-party proxy forwards one path of the site to https://in.crispstats.com/p/ and forwards only content-type, user-agent, accept-language, referer, origin, if-none-match and x-forwarded-for, never cookies.

# Site summary widget: monthly visitors and Domain Rating

> One card with your visitors in the last 30 days, your Domain Rating from Ahrefs and a 30-day trend line, for your site, a README or a Notion page.

The site summary is one card with the two numbers people ask about first: how many visitors the site had in the last 30 days and its Domain Rating from Ahrefs, over a line of daily visitors. Our credit, **Powered by CrispStats**, sits at the bottom left of every summary card, on every plan, and **Domain Rating by Ahrefs** sits at the bottom right whenever the rating shows.

![A card with a trend icon, Monthly visitors 72,229, a donut at 43 headed Domain Rating, a 30-day line under both, Powered by CrispStats at the bottom left and Domain Rating by Ahrefs at the bottom right](https://mintcdn.com/crispstats/4oY9cnJQ4YGOzN1w/images/widgets/site-summary-light.png?fit=max\&auto=format\&n=4oY9cnJQ4YGOzN1w\&q=85\&s=e1665781ca720e6a1d6b1e745e78be6e)

Site summary, light page

![The same site summary card on a dark page](https://mintcdn.com/crispstats/4oY9cnJQ4YGOzN1w/images/widgets/site-summary-dark.png?fit=max\&auto=format\&n=4oY9cnJQ4YGOzN1w\&q=85\&s=66fa24d1a37ee44d54bbfc2e46574e5c)

Site summary, dark page

## What it shows

| Part | What it is |
| - | - |
| **Monthly visitors** | Visitors in the last 30 days, as a full number such as `72,229`. Only when the full number cannot fit the size does it shorten, such as `987.7M` at size Small. The info mark next to the heading reads "Visitors in the last 30 days, counted by CrispStats without cookies." |
| **Domain Rating** | Your domain's Domain Rating from Ahrefs as a whole number, with a donut that fills to it out of 100. Its info mark reads "Domain Rating shows the strength of a site's backlink profile on a scale from 0 to 100." |
| The line | Visitors per day over the same 30 days, across the full width, with no axes. |
| Bottom left | Our mark and `Powered by CrispStats`, a link to your public dashboard or our home page. |
| Bottom right | `Domain Rating by Ahrefs`, with `Ahrefs` linking to Ahrefs, next to the rating as Ahrefs' licence asks. |

The info marks are real buttons: they take keyboard focus, and screen readers announce the explanation. Hovering shows it as a tooltip.

## When parts are left out

| Situation | What the card does |
| - | - |
| The domain has no Domain Rating yet, or cannot have one (`localhost`, an IP address, a reserved name) | The rating, its donut and the Ahrefs line are left out, and the visitors take the full width. There is never an empty ring. |
| No visitors in the last 30 days | The widget stays hidden, with no gap, like a traffic card with a figure of 0. |
| The figures could not be refreshed | The last figures show, with their time in the footer where it fits, for up to 6 hours. See [Widget JSON](https://docs.crispstats.com/share/widgets/json-api.md#caching-and-freshness). |

Creating a site summary on a site that has never been read asks Ahrefs for the first rating straight away, as a Domain Rating widget does. See [Domain Rating](https://docs.crispstats.com/share/widgets/domain-rating.md#how-often-it-is-read).

## Sizes and styles

The card keeps a 2:1 shape at every size, in all five [styles](https://docs.crispstats.com/share/widgets.md#styles) and with any accent:

| Small | Medium | Large |
| - | - | - |
| 320 × 160 px | 384 × 192 px | 480 × 240 px |

**Label** replaces the heading "Monthly visitors", such as `Readers this month`. The **Domain Rating** heading and both credits cannot be changed, and the **Credit** switch is locked on for this widget on every plan.

## Add the widget

1. Open **Settings**, **Sharing and widgets** and pick **Site summary card**, the first tile under **Show growth**.
2. Pick a size and a style, then select **Create widget**.
3. Copy the code. On a page, the script draws the card with both links:

```html wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
<script async src="https://in.crispstats.com/w/v1/loader.js"></script>
<crispstats-widget widget="cs_wd_7Hq2Lx9PzK4mVt8RbN3cW1yD" style="display:inline-block;vertical-align:middle;width:384px;height:192px"></crispstats-widget>
```

In a README, the image links to Ahrefs, as the licence asks for the rating it shows, and our credit follows as its own link:

```html wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
<a href="https://ahrefs.com/"><picture><source media="(prefers-color-scheme: dark)"><img alt="Monthly visitors and Domain Rating of quillbook.com" src="https://in.crispstats.com/w/v1/i/cs_wd_7Hq2Lx9PzK4mVt8RbN3cW1yD.svg?theme=light" width="384" height="192"></picture></a>
<a href="https://crispstats.com/share/quillbook">Powered by CrispStats</a>
```

Where only Markdown is allowed, the **Markdown** tab gives the same two links:

```md wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
[![Monthly visitors and Domain Rating of quillbook.com](https://in.crispstats.com/w/v1/i/cs_wd_7Hq2Lx9PzK4mVt8RbN3cW1yD.svg)](https://ahrefs.com/) [Powered by CrispStats](https://crispstats.com/share/quillbook)
```

The image is drawn by the same renderer as the card:

![The site summary as an image: Monthly visitors 72,229, Domain Rating 43, the line, Powered by CrispStats and Domain Rating by Ahrefs](https://mintcdn.com/crispstats/4oY9cnJQ4YGOzN1w/images/widgets/summary-card-light.svg?fit=max\&auto=format\&n=4oY9cnJQ4YGOzN1w\&q=85\&s=2fc72bd923645a774f6bfef650b4c6fb)

The README image

A shields.io badge shows the visitors only, such as `monthly visitors` and `72.2k`, so it needs no Ahrefs line:

```md wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
[![Monthly visitors of quillbook.com](https://img.shields.io/endpoint?url=https%3A%2F%2Fin.crispstats.com%2Fw%2Fv1%2Fs%2Fcs_wd_7Hq2Lx9PzK4mVt8RbN3cW1yD)](https://crispstats.com/share/quillbook)
```

Your own code carries your widget's token instead of `cs_wd_7Hq2Lx9PzK4mVt8RbN3cW1yD`. The iframe, Notion and React forms are on [Embed a widget](https://docs.crispstats.com/share/widgets/embed.md).

## Try it with the demo

This code shows the demo site's summary, served from generated data. Paste it in any page to see the card:

```html wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
<script async src="https://in.crispstats.com/w/v1/loader.js"></script>
<crispstats-widget widget="cs_wd_demoSiteSummary000000000" style="display:inline-block;vertical-align:middle;width:384px;height:192px"></crispstats-widget>
```

## What becomes public

The visitors in the last 30 days, their daily values for the line, your Domain Rating and the day it was read, and your site's name and domain. Nothing else: no pages, sources, countries or revenue. In the JSON answer, `data` carries exactly these fields and `view` the same figures as text:

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "v": 1,
  "token": "cs_wd_demoSiteSummary000000000",
  "kind": "summary",
  "layout": "card",
  "size": "m",
  "theme": "auto",
  "style": "soft",
  "accent": "brand",
  "site": {
    "name": "Quillbook",
    "domain": "quillbook.example"
  },
  "asOf": "2026-11-23T15:47:31.409Z",
  "data": {
    "kind": "summary",
    "visitors": 72229,
    "domain": "quillbook.example",
    "rating": 42.6,
    "readOn": "2026-11-23",
    "series": [1457, 2124, 2079, 2264, 2076, 2006, 1594, 1655, 2190, 2129, 5293, 3481, 2596, 1795, 1597, 2127, 2240, 2343, 2601, 2282, 1710, 5694, 3622, 2981, 2536, 2562, 2305, 1655, 1663, 1572]
  },
  "view": {
    "state": "ready",
    "text": "72.2k visitors in the last 30 days",
    "label": "Monthly visitors",
    "value": "72,229",
    "delta": null,
    "footer": "",
    "aria": "Monthly visitors: 72,229 visitors in the last 30 days. Domain Rating 43 out of 100 for quillbook.example. Domain Rating by Ahrefs. Powered by CrispStats.",
    "spark": [256, 373, 365, 398, 365, 352, 280, 291, 385, 374, 930, 611, 456, 315, 280, 374, 393, 411, 457, 401, 300, 1000, 636, 524, 445, 450, 405, 291, 292, 276],
    "bars": null,
    "rows": null,
    "strip": null,
    "progress": null,
    "gauge": 0.426,
    "live": false,
    "refreshMs": 0,
    "hidden": false,
    "badge": {
      "label": "monthly visitors",
      "message": "72.2k"
    },
    "info": "Visitors in the last 30 days, counted by CrispStats without cookies.",
    "short": "72.2k",
    "side": {
      "label": "Domain Rating",
      "value": "43",
      "info": "Domain Rating shows the strength of a site's backlink profile on a scale from 0 to 100."
    }
  },
  "attribution": {
    "text": "Powered by CrispStats",
    "href": "https://crispstats.com/share/quillbook"
  },
  "source": {
    "text": "Domain Rating by Ahrefs",
    "linkText": "Ahrefs",
    "href": "https://ahrefs.com/"
  },
  "colors": {
    "light": {
      "surface": "#ffffff",
      "ground": "#ffffff",
      "ink": "#23211e",
      "muted": "#6e6a64",
      "border": "rgba(35,33,30,0.12)",
      "shadow": "0 1px 2px rgba(0,0,0,0.06)",
      "track": "rgba(35,33,30,0.10)",
      "accent": "#f2600c",
      "focus": "#f2600c"
    },
    "dark": {
      "surface": "#1e1d1a",
      "ground": "#1e1d1a",
      "ink": "#f0eeea",
      "muted": "#9a968f",
      "border": "rgba(240,238,234,0.14)",
      "shadow": "0 1px 2px rgba(0,0,0,0.3)",
      "track": "rgba(240,238,234,0.10)",
      "accent": "#ff7a2e",
      "focus": "#ff7a2e"
    }
  }
}
```

## Next steps

> [card] [Domain Rating](https://docs.crispstats.com/share/widgets/domain-rating.md)
>
> How the rating is read, and the attribution Ahrefs requires.

> [card] [Traffic figures](https://docs.crispstats.com/share/widgets/stat.md)
>
> Visitors, pageviews or sessions over any range.

> [card] [Embed a widget](https://docs.crispstats.com/share/widgets/embed.md)
>
> Script, iframe, README, Notion, shields.io and React.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.