Skip to content

Support filtering by standard dimensions on all query tools - #2

Merged
chrmod merged 1 commit into
ghosteryfrom
dimension-filters
Aug 19, 2026
Merged

Support filtering by standard dimensions on all query tools#2
chrmod merged 1 commit into
ghosteryfrom
dimension-filters

Conversation

@chrmod

@chrmod chrmod commented Aug 19, 2026

Copy link
Copy Markdown
Member

Adds a dimension_filters parameter to get_timeseries, get_breakdown, get_conversions, and compare_periods: filter by any standard dimension with is / is_not / contains / contains_not, AND-combined with the existing page/goal/property_filters.

Why: the tools could only filter by page (event-level) and custom properties, so session metrics could not be scoped to a dimension value — e.g. visits per utm_campaign for one campaign family was inexpressible, since the page filter rules out session metrics and utm dimensions had no filter at all. visit:* filters combine with session metrics, so this closes that gap; server instructions and README now point clients at it.

Verified end-to-end against the live site: get_breakdown on visit:utm_campaign with a contains filter returns per-campaign visit counts through the built STDIO server.

Worker deploy stays a manual follow-up after merge (pnpm deploy); running MCP sessions pick the new parameter up on restart.

The query tools could only filter by page (event-level) and custom
event properties, so a session-level question like visits per
utm_campaign could not be scoped to the campaigns in question: the
page filter forces event-level metrics, and utm dimensions had no
filter at all.

dimension_filters accepts any standard dimension with is / is_not /
contains / contains_not, AND-combined with the existing filters.
visit:* filters combine with session metrics, so visits can now be
segmented directly. Verified against the live site: get_breakdown on
visit:utm_campaign with a contains filter returns per-campaign visit
counts.
@chrmod
chrmod merged commit 660af35 into ghostery Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant