# Live visitors card

> Canonical HTML: https://screenrig.ai/docs/cards/live-visitors/

How many people are on the site or app right now, with the last half hour, the top pages and the top sources.

Category: Operations. Tags: Numbers and metrics, Charts and gauges, Offices and workplaces, Stores.

## Previews

![Live visitors](/cards/live-visitors/v1/screenshots/canvas-bloom.webp?sha=be96d1a6e528436b057092086456bc3042042a0f241a60dcca22c95997f17981)

Canvas

![Live visitors](/cards/live-visitors/v1/screenshots/corner-bloom.webp?sha=ce8fdeaa1009ca8450a645f4355ca857ce49b3f5b0991a64434f101425e7ec40)

Corner

![Live visitors](/cards/live-visitors/v1/screenshots/chip-bloom.webp?sha=a28a6fd81dfb9d0c3c68f04603e1ea9adb35b00e4acbfdcecbdeea9902bea32e)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

Feed: `screenrig.visitors/v1`.

Feed documents carry source attribution. The Player supplies the feed to the card.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#common-properties).

Set static properties in `params`. Bind `data` to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in `params`. Nested rows describe the contents of their parent property.

### Static properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `"Live visitors"` | maxLength: `40` |  |
| `rows` | integer | `5` | minimum: `1`; maximum: `8` | Rows in each list. |
| `staleMinutes` | integer | `10` | minimum: `1`; maximum: `1440` | A feed older than this shows how long ago it updated. |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `site` | string | `""` | maxLength: `60` | The site or app the numbers describe; the feed's wins. |
| `active` | integer, null | `null` | minimum: `0`; maximum: `100000000` | Visitors online now. Empty falls back to the larger total of the lists. |
| `series` | array | `[]` | maxItems: `60` | Visitors online each minute, oldest first; the last 30 are drawn. |
| `pages` | array | `[]` | maxItems: `20` | Top pages, the same document as the screenrig.visitors/v1 feed's `pages`. The feed wins when present. |
| `pages[].path` | string | `""` | maxLength: `80` | The page's path (/pricing). |
| `pages[].title` | string | `""` | maxLength: `80` | Shown instead of the path when present. |
| `pages[].visitors` | integer |  | minimum: `0`; maximum: `10000000`; Required | Visitors on the page now. |
| `sources` | array | `[]` | maxItems: `20` | Top sources, the same document as the feed's `sources`. |
| `sources[].name` | string |  | minLength: `1`; maxLength: `80`; Required | Where visitors came from (Google, Direct, Newsletter). |
| `sources[].visitors` | integer |  | minimum: `0`; maximum: `10000000`; Required | Visitors from this source now. |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "live-visitors",
  "primitive": "card",
  "card": "live-visitors",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "live-visitors-main"
}
```

## Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see [API authentication](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/live-visitors-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"site":"","active":null,"series":[],"pages":[],"sources":[]}}'
```
