Live visitors card

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
Canvas
Live visitors
Corner
Live visitors
Chip

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

NameTypeDefaultValues and limitsDescription
titlestring"Live visitors"maxLength: 40
rowsinteger5minimum: 1; maximum: 8Rows in each list.
staleMinutesinteger10minimum: 1; maximum: 1440A feed older than this shows how long ago it updated.

Dynamic properties

NameTypeDefaultValues and limitsDescription
sitestring""maxLength: 60The site or app the numbers describe; the feed's wins.
activeinteger, nullnullminimum: 0; maximum: 100000000Visitors online now. Empty falls back to the larger total of the lists.
seriesarray[]maxItems: 60Visitors online each minute, oldest first; the last 30 are drawn.
pagesarray[]maxItems: 20Top pages, the same document as the screenrig.visitors/v1 feed's pages. The feed wins when present.
pages[].pathstring""maxLength: 80The page's path (/pricing).
pages[].titlestring""maxLength: 80Shown instead of the path when present.
pages[].visitorsintegerminimum: 0; maximum: 10000000; RequiredVisitors on the page now.
sourcesarray[]maxItems: 20Top sources, the same document as the feed's sources.
sources[].namestringminLength: 1; maxLength: 80; RequiredWhere visitors came from (Google, Direct, Newsletter).
sources[].visitorsintegerminimum: 0; maximum: 10000000; RequiredVisitors 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":[]}}'