# Microsoft Clarity

> Read Microsoft Clarity's website analytics: dashboard metrics for traffic, engagement and frustration signals broken down by device, country or channel, session recordings filtered by what visitors did, and plain-language questions about the dashboard.

App · 3 actions. Web page: https://docs.lodol.com/docs/integrations/microsoft-clarity

## Actions

### Ask the dashboard

Ask Clarity a question about the dashboard in plain language, such as 'Top browsers in the last 3 days', and get the figures that answer it.

**Inputs**

- Question (`query`, text, required): One question about the dashboard, in plain language, with an explicit time range.
- Time zone (`timezone`, text): The time zone 'today' and 'last 3 days' are read in, as an IANA name. Defaults to UTC. Default: `UTC`.

**Outputs**: Clarity's answer, as sent

- `result`: The answer, when Clarity sends something other than an object

**Example output**

```json
{
  "result": "Chrome: 1,204 sessions; Safari: 512 sessions"
}
```

### Get dashboard insights

Read the Clarity dashboard for the last 24, 48 or 72 hours: sessions, bot sessions, distinct users and pages per session, plus engagement time, scroll depth and the frustration signals (rage clicks, dead clicks, quick backs, excessive scrolling, JavaScript errors). Optionally break them down by up to three of browser, device, country, OS, source, medium, campaign, channel or URL. Clarity allows 10 of these per project per day, shared by every workflow using the project.

**Inputs**

- Period (`num_of_days`, text): How far back to read, counted from now (UTC). One of: `1` (Last 24 hours), `2` (Last 48 hours), `3` (Last 72 hours). Default: `1`.
- Break down by (`dimensions`, list): Up to three dimensions to break the metrics down by, such as Device and Country/Region. Leave empty for the overall figures. One or more of: `Browser`, `Device`, `Country/Region`, `OS` (Operating system), `Source`, `Medium`, `Campaign`, `Channel`, `URL` (Page URL).

**Outputs**

- `dimensions` (list): The dimensions the data was broken down by
- `dimensions_applied` (true/false): Whether any row came back broken down by a chosen dimension; empty when none was chosen or there were no rows
- `metrics` (list): Each dashboard metric with its rows
- `num_of_days` (number): How many days back the data covers (1-3)

**Example output**

```json
{
  "dimensions": [
    "OS"
  ],
  "dimensions_applied": true,
  "metrics": [
    {
      "information": [
        {
          "OS": "Other",
          "PagesPerSessionPercentage": 1.0931,
          "distantUserCount": "189733",
          "totalBotSessionCount": "8369",
          "totalSessionCount": "9554"
        }
      ],
      "metricName": "Traffic"
    }
  ],
  "num_of_days": 1
}
```

### List session recordings

List recorded sessions from a time range, with links to watch them, filtered by device, browser, OS, country, channel, new or returning visitor, a page visited, or rage and dead clicks, and sorted by start time, length, clicks or pages.

**Inputs**

- From (`start`, date and time): Only sessions from this time on. Defaults to two days before 'To'.
- To (`end`, date and time): Only sessions up to this time. Defaults to now.
- Sort by (`sort_by`, text): The order recordings come back in. One of: `SessionStart_DESC` (Newest first), `SessionStart_ASC` (Oldest first), `SessionDuration_ASC` (Shortest first), `SessionDuration_DESC` (Longest first), `SessionClickCount_ASC` (Fewest clicks first), `SessionClickCount_DESC` (Most clicks first), `PageCount_ASC` (Fewest pages first), `PageCount_DESC` (Most pages first). Default: `SessionStart_DESC`.
- How many (`count`, number): How many recordings to return, up to 250. From 1 to 250. Default: `100`.
- Devices (`device_types`, list): Only sessions on these kinds of device. One or more of: `PC` (Desktop), `Mobile`, `Tablet`, `Email`, `Other`.
- Browsers (`browsers`, list): Only sessions in these browsers. One or more of: `Chrome`, `Edge`, `Safari`, `Firefox`, `Opera`, `OperaMini` (Opera Mini), `Samsung`, `SamsungInternet` (Samsung Internet), `MiuiBrowser` (MIUI Browser), `UCBrowser` (UC Browser), and 10 more.
- Operating systems (`operating_systems`, list): Only sessions on these operating systems. One or more of: `Windows`, `MacOS`, `iOS`, `Android`, `Linux`, `ChromeOS`, `WindowsMobile` (Windows Mobile), `BlackBerry`, `Other`.
- Countries (`countries`, list): Only sessions from these countries, by name as Clarity shows them, separated by commas.
- Channels (`channels`, list): Only sessions that arrived through these channels. One or more of: `Direct`, `OrganicSearch` (Organic search), `PaidSearch` (Paid search), `Referral`, `Social`, `Email`, `Display`, `Affiliate`, `Video`, `Audio`, and 4 more.
- Visitors (`user_type`, text): Only new or only returning visitors. Leave empty for both. One of: `NewUser` (New visitors), `ReturningUser` (Returning visitors).
- Visited page (`visited_url`, text): Only sessions that visited a page whose URL matches this.
- Page match (`visited_url_match`, text): How 'Visited page' is compared with each URL. One of: `contains`, `isExactly` (Is exactly), `startsWith` (Starts with), `endsWith` (Ends with), `excludes` (Does not contain), `isExactlyNot` (Is not exactly), `matchesRegex` (Matches regex), `excludesRegex` (Does not match regex). Default: `contains`.
- Only sessions with rage clicks (`rage_clicks_only`, true/false): Turn on to keep only sessions where someone clicked repeatedly in frustration. Default: `false`.
- Only sessions with dead clicks (`dead_clicks_only`, true/false): Turn on to keep only sessions with clicks that did nothing. Default: `false`.

**Outputs**: Clarity's answer, as sent

- `recordings` (list): The recordings, when Clarity answers with a list

**Example output**

```json
{
  "recordings": []
}
```
