MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getFunnel

Function getFunnel

apps/api/src/controllers/insights.controller.ts:365–377  ·  view source on GitHub ↗
(
  req: FastifyRequest<{
    Params: { projectId?: string };
    Querystring: z.infer<typeof zFunnelQuery>;
  }>,
  reply: FastifyReply
)

Source from the content-addressed store, hash-verified

363});
364
365export async function getFunnel(
366 req: FastifyRequest<{
367 Params: { projectId?: string };
368 Querystring: z.infer<typeof zFunnelQuery>;
369 }>,
370 reply: FastifyReply
371) {
372 const projectId = await getProjectId(req as RequestWithProjectParam);
373 const { startDate, endDate } = await resolveDates(projectId, req.query);
374 return reply.send(
375 await getFunnelCore({ projectId, startDate, endDate, steps: req.query.steps, windowHours: req.query.windowHours, groupBy: req.query.groupBy })
376 );
377}
378
379// ---------------------------------------------------------------------------
380// Analytics — traffic

Callers

nothing calls this directly

Calls 4

getFunnelCoreFunction · 0.90
getProjectIdFunction · 0.70
resolveDatesFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected