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



Views and forms
Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.
Card views, themes and publishing. Browse the gallery.
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.
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.
{
"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.
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":[]}}'