Skip to content

Commit 92cfaee

Browse files
desioracclaude
andcommitted
fix(funnel): filter internal/test scans from cta_impression metrics
Internal (mcp_int_*) and test (mcp_test_*) keys were inflating cta_impression counts in /v1/funnel-metrics, distorting conversion rates. Filter by plan field logged in each event. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6141b02 commit 92cfaee

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

trust_layer/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,9 @@ async def funnel_metrics(
18521852
continue
18531853
evt = entry.get("event", "")
18541854
if evt in counts:
1855+
# Skip internal/test scans for accurate conversion metrics
1856+
if evt == "cta_impression" and entry.get("plan") in ("internal", "test"):
1857+
continue
18551858
counts[evt] += 1
18561859
day = ts[:10]
18571860
by_day.setdefault(day, {"cta_impression": 0, "register_page_visit": 0, "register_completion": 0})

0 commit comments

Comments
 (0)