Support querying custom event properties - #1
Merged
Conversation
Break down by any event:props:<name> dimension and filter any query tool by custom property values, so sites can slice by the properties their own tracker sends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Let the MCP query Plausible custom event properties, generically — no property names are hardcoded, so any site can slice by whatever its own tracker sends.
get_breakdownaccepts adimensionofevent:props:<name>(e.g.event:props:destination_host) alongside the standard dimensions.get_breakdown,get_timeseries,get_conversions,compare_periods) via a newproperty_filtersinput, e.g.[{ "property": "plan", "operator": "is", "values": ["pro"] }]. Operators:is,is_not,contains,contains_not; entries combine with AND.Shared schema + filter builders live in
src/schemas.ts; server instructions now document theevent:props:convention to steer clients away from malformed queries.Branched off
mainso it can also go upstream togetsentry/plausible-mcplater; this PR lands it onghosteryfor deployment.Test plan
In an MCP client pointed at the deployed server: