> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gleap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get survey analytics

> Survey step analytics from ClickHouse (`survey_events`), Typeform-style. Query `from`, `to` (YYYY-MM-DD,
UTC, inclusive; default the last 30 days, at most 400), `version`, `channel`, `device`
(phone|tablet|desktop), `interval` (day|week), `tz` (IANA zone for the weekday × hour heatmap).
Returns `{ available, range, header: { views, uniqueViews, starts, submissions, completionRate, startRate,
avgTimeToCompleteMs, welcomeViews, welcomeStartRate } (each `{ value, previous, byDevice }`), funnel, worstStepBlockId, dismissed, timing,
backNavigation, closePoints, series, breakdowns, heatmap, versions, score, reminders, email, sources,
quality }`. `available: false` when no events were recorded in the range. Cached 60 seconds.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /engagement/surveys/{surveyId}/analytics
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /engagement/surveys/{surveyId}/analytics:
    get:
      tags:
        - Engagement Survey
      summary: Get survey analytics
      description: >-
        Survey step analytics from ClickHouse (`survey_events`), Typeform-style.
        Query `from`, `to` (YYYY-MM-DD,

        UTC, inclusive; default the last 30 days, at most 400), `version`,
        `channel`, `device`

        (phone|tablet|desktop), `interval` (day|week), `tz` (IANA zone for the
        weekday × hour heatmap).

        Returns `{ available, range, header: { views, uniqueViews, starts,
        submissions, completionRate, startRate,

        avgTimeToCompleteMs, welcomeViews, welcomeStartRate } (each `{ value,
        previous, byDevice }`), funnel, worstStepBlockId, dismissed, timing,

        backNavigation, closePoints, series, breakdowns, heatmap, versions,
        score, reminders, email, sources,

        quality }`. `available: false` when no events were recorded in the
        range. Cached 60 seconds.
      operationId: Analytics
      parameters:
        - in: path
          name: surveyId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.