feat: add external funnel monitoring and conversion alerts
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s

This commit is contained in:
OG T
2026-06-07 16:40:38 +08:00
parent 7c4841c27d
commit 71a765d1de
5 changed files with 271 additions and 2 deletions

View File

@@ -162,6 +162,14 @@ export async function GET(request: NextRequest) {
return false;
};
const isInternalActor = (params: {
actorType: string | null | undefined;
actorId: string | null | undefined;
}) => {
if (params.actorType === "AGENT") return false;
return isInternalActorId(params.actorId);
};
const externalActorSummary = externalActorRows
.map((row) => ({
actorId: row.actorId || "unknown",
@@ -246,7 +254,11 @@ export async function GET(request: NextRequest) {
});
const recentExternalEvents = recentEvents.filter((event) =>
event.action.startsWith("EXTERNAL_") && !isInternalActorId(event.actorId)
event.action.startsWith("EXTERNAL_") &&
!isInternalActor({
actorType: event.actorType,
actorId: event.actorId,
})
);
const recentInternalEvents = recentEvents.filter(