Get quiz answers analytics data

Changed on

Retrieve user response analytics for a specific quiz showing distribution of answers across quiz screens. This endpoint returns data for creating charts showing how users answered each question in the quiz.

post/cabinet/analytics/quiz-answers/get-data

Request

  • Base URL
    https://api.web2wave.com/api
  • URL
    https://api.web2wave.com/api/cabinet/analytics/quiz-answers/get-data
  • Auth
    API key in header api_key

Request body application/x-www-form-urlencoded

project_idinteger required

Project ID to analyze

quiz_idinteger required

Quiz ID to analyze

fromstring date

Start date for analysis (YYYY-MM-DD)

tostring date

End date for analysis (YYYY-MM-DD)

_tokenstring required

CSRF token for authentication

Example request

{
  "project_id": 123,
  "quiz_id": 456,
  "from": "2024-01-01",
  "to": "2024-01-31",
  "_token": "abc123def456"
}

Response

Analytics data retrieved successfully

successboolean

Example response

{
  "success": true,
  "data": [
    {
      "screen_id": "screen_1",
      "screen_title": "What is your age range?",
      "total_responses": 1234,
      "chart_data": {
        "labels": [
          "18-24",
          "25-34",
          "35-44",
          "45+"
        ],
        "datasets": [
          {
            "label": "Unique Users",
            "data": [
              345,
              456,
              234,
              199
            ],
            "backgroundColor": [
              "#FF6384",
              "#36A2EB",
              "#FFCE56",
              "#4BC0C0"
            ]
          }
        ]
      }
    }
  ],
  "quiz": {
    "id": 456,
    "name": "Customer Survey Quiz",
    "screens_count": 5
  },
  "period": {
    "from": "2024-01-01",
    "to": "2024-01-31"
  }
}

Changes