# Embedding a dashboard

A page or post can show a read-only dashboard of a tracked site, for example
a report per client behind each client's login. It is the dashboard of a
[share link](/docs/track/sharing.md), placed in the page with the
`[sleek_track]` shortcode or the **SleekTrack dashboard** block.

## Who can embed one

Only a post whose author may view Track, an administrator or a role chosen on
the [Access](/docs/track/access.md) page, shows a dashboard. Saving such a post
stores each of its dashboards and the address it reads its numbers through;
showing the page never stores one. A post by any other author, such as a
Contributor, stores nothing and shows no dashboard, in its preview too, and a
dashboard outside a post, in a widget area or a template, shows none either.
The block's preview in the editor shows its numbers only to someone who may
view Track.

## The block

Add the **SleekTrack dashboard** block and set it up in the block's sidebar:

- **Site**: **This site**, the site Track runs on, or any other tracked site
- **Title**: shown instead of the site's domain, without its icon
- **Period**, and **Fixed period** to keep the viewer from changing it
- **Filters**: optional, written as `key=value` pairs separated by
  semicolons, such as `country=DE;pages=/pricing/ /blog/*`
- **Visible cards**: which of **Sources**, **Pages**, **Locations**,
  **Devices** and **Goals** it shows
- **Required role**: who may see it, such as **Editor**

The editor shows the site, the period and its headline numbers; the page
shows the full dashboard once the post is saved.

## The shortcode

```text
[sleek_track site="12" period="7d" fixed="yes" cards="pages,locations" filters="pages=/pricing/ /blog/*" role="editor" title="Client report"]
```

Every attribute is optional:

| Attribute | Value                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `site`    | A tracked site's ID; without it, the site Track runs on                                                  |
| `period`  | `day`, `7d`, `30d` (the default), `month`, `6mo`, `12mo` or `all`                                        |
| `fixed`   | `yes` keeps the viewer on the period                                                                     |
| `cards`   | A comma-separated list of `sources`, `pages`, `locations`, `devices` and `goals`; all of them by default |
| `filters` | `key=value` pairs separated by semicolons, with the keys the dashboard's filters use                     |
| `role`    | A role the viewer needs, such as `editor`                                                                |
| `title`   | The heading instead of the site's domain                                                                 |

The filter keys are those of the dashboard's chips: `page`, `pages` (several
paths, see [groups of pages](/docs/track/dashboard.md#groups-of-pages)), `term`
(`taxonomy:term-id`), `source`, `country`, `continent`, `region`, `city`,
`device`, `browser`, `os`, `goal` and the UTM keys. Unknown keys are ignored.

## Who sees it

The dashboard follows the page: a private page, a password-protected page and
a page a membership plugin hides show it only to the people who can read the
page. With a required role, a signed-in viewer also needs that role;
administrators always see it. A viewer who fails either gets no dashboard and
no address to its data.

The preset filters and period work as on a
[share link with a preset](/docs/track/sharing.md#presets): the viewer cannot
remove them, only add filters of their own within the visible cards. Like a
share link, the dashboard reads its numbers through an address of its own,
which the page hands only to viewers who pass; treat a copied address like a
share link.

## Revoking one

A site's **Sharing** section lists the dashboards its posts embed under
**Embedded dashboards**, each named by the posts that show it, and the trash
icon revokes one after asking. Its address stops working at once and its posts show
nothing until one of them is saved again, which stores the dashboard under a
new address.
