---
title: "Filter workspace analytics by directory"
description: "A directory picker now sits next to the link picker on the workspace analytics dashboard. Pick a directory and every widget narrows to its links and those of every directory below it. Also in the API, MCP tools and SDKs."
canonical: "https://linkbreakers.com/help/article/filter-analytics-by-directory"
last-updated: 2026-10-28
---

# Filter workspace analytics by directory

> A directory picker now sits next to the link picker on the workspace analytics dashboard. Pick a directory and every widget narrows to its links and those of every directory below it. Also in the API, MCP tools and SDKs.

## Short answer

Your workspace analytics dashboard can now be filtered by directory. On **Insights**, a picker labelled **All directories** sits next to **Filter by link**. Choose a directory and every widget narrows to the links in that directory and in every directory below it. The choice is kept in the page URL, so a filtered view can be bookmarked or shared with teammates. The same filter is available as `directory_id` in the API, the MCP analytics tools and the SDKs.

## What we shipped

Until now, a workspace dashboard covered either every link in the workspace or one link. If you organise links in [directories](/help/article/what-is-a-directory-in-linkbreakers) (included with Pro and Enterprise), say one per client, region or campaign, there was no way to read the numbers for one directory as a whole.

### A directory picker on the dashboard

On a workspace analytics dashboard, open **All directories** and pick a directory.

- Every widget narrows to the links in that directory and in every directory below it
- Choosing a link in **Filter by link** clears the directory, and choosing a directory clears the link
- The choice is stored in the page URL (`?directory=`), so you can bookmark the filtered view or send the link to a teammate

The picker does not appear on a link's own dashboard, which is already scoped to one link.

### The Assistant sees the same filter

When you ask a question in **Edit & Analyze**, the Assistant answers with the same directory filter the widgets show, so its numbers match what is on screen.

### In the API, MCP and SDKs

The analytics endpoints accept an optional `directory_id` (`directoryId` in REST JSON) next to `link_id`. That covers analytics data (breakdowns, geo, devices, trends, top links, funnels, attributes), the events metric, the events time series and the visitor attribute keys. The MCP analytics tools take `directory_id` too.

- A directory covers its own links and those of every directory below it
- An empty directory returns nothing, never the whole workspace
- Sending `link_id` and `directory_id` together answers `400` with `LINK_FILTER_LINK_AND_DIRECTORY`
- A directory that is not in the workspace answers `404` with `DIRECTORY_NOT_FOUND`

## Frequently asked questions

### Does the filter include subdirectories?

Yes. Picking a directory covers its own links and the links of every directory below it.

### Can I filter by a directory and a link at the same time?

No. Choosing one clears the other. In the API, sending both answers `400 LINK_FILTER_LINK_AND_DIRECTORY`.

### Can I share a filtered view?

Yes, with teammates. The directory is part of the page URL, so anyone in the workspace who opens the link sees the same filter. Every member still has access to the whole workspace; the filter is a view, not a permission.

### How do agencies use this?

Keep one workspace with a directory per client, then pick a client's directory to read that client's numbers on their own. If you want clients fully separate, with their own plan and bill, [create a workspace per client](/help/article/create-a-new-workspace) instead.

### Why is the picker missing on a link's dashboard?

A link's own dashboard is already scoped to that link, so there is nothing to narrow down.
