feat: add external funnel monitoring and conversion alerts
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user