:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { combineUrl } from 'kea-router'
import { urls } from 'scenes/urls'
import { AnyPropertyFilter, PropertyFilterType, PropertyOperator } from '~/types'
import { kpiTileUrls } from './KpiTiles'
const EVENT_FILTER: AnyPropertyFilter = {
key: '$mcp_tool_name',
value: ['create_insight'],
operator: PropertyOperator.Exact,
type: PropertyFilterType.Event,
}
describe('KpiTiles', () => {
it('keeps dashboard filters in Sessions and Tool quality links', () => {
const searchParams = {
date_from: '-7d',
properties: [EVENT_FILTER],
filter_test_accounts: false,
}
const tileUrls = kpiTileUrls({ ...searchParams, landing: 'old', search: 'old' })
expect(tileUrls.sessions).toBe(combineUrl(urls.mcpAnalyticsSessions(), searchParams).url)
expect(tileUrls.toolQuality).toBe(combineUrl(urls.mcpAnalyticsToolQuality(), searchParams).url)
expect(tileUrls.intentClustering).toBe(combineUrl(urls.mcpAnalyticsIntentClustering(), searchParams).url)
})
})