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

# Participant data collection

> Collect first names, last names, and email addresses from quiz participants before they join a session

## What is data collection?

Participant data collection allows quiz hosts to gather personal information (first name, last name, email) from participants **before they enter the lobby**. The feature is fully configurable per quiz - you can choose whether the form is required, whether participants can skip it, and filter accepted email domains.

<Info>
  **Perfect for:** Corporate training, conferences, events with follow-up, online courses, marketing contests, new employee onboarding.
</Info>

## How it works

<Steps>
  <Step title="Enable data collection">
    In the quiz editor, check **"Collect data from participants"** in the Data collection section.
  </Step>

  <Step title="Configure the form">
    Set the form header, marketing consent text, and email domain filtering mode.
  </Step>

  <Step title="Run the quiz">
    After entering their nickname and choosing an avatar, participants see the data form.
  </Step>

  <Step title="Participants fill the form">
    They provide first name, last name, email, and mandatory accept marketing consent.
  </Step>

  <Step title="Download data report">
    After the session ends, download collected data as PDF or Excel.
  </Step>
</Steps>

## Configuration

### Enabling the feature

In the quiz editor, find the **"Participant data collection"** section:

| Setting                            | Description                                   | Default              |
| ---------------------------------- | --------------------------------------------- | -------------------- |
| **Collect data from participants** | Main toggle for the feature                   | Disabled             |
| **Form header**                    | Text displayed at the top of the form         | "Enter your details" |
| **Marketing consent text**         | Text next to the consent checkbox             | Default text         |
| **Domain filter mode**             | Control over accepted email addresses         | Disabled             |
| **Allow skipping the form**        | Whether participants can proceed without data | No                   |

### Form header

You can customize the header displayed at the top of the data form. The default is "Enter your details", but you can change it to e.g.:

* "Participant registration"
* "Training form"
* "Certificate details"

Maximum length: **500 characters**.

### Marketing consent

Mandatory checkbox with consent text you define yourself. Default text:

> I consent to receiving marketing communications from the quiz organizer.

<Tip>
  **Customize the text** for your specific event - you can add information about the organizer, processing purpose, or legal basis.
</Tip>

<Warning>
  The consent text is saved as a **snapshot** at the moment the participant accepts it. Even if you later change the text in quiz settings, the database record preserves the original text the participant agreed to.
</Warning>

### Email domain filtering

Three modes of control over participant email addresses:

<Tabs>
  <Tab title="Disabled (default)">
    Accepts any valid email address. No additional domain validation.

    **When to use:** Open quizzes, public events, situations with no email type requirements.
  </Tab>

  <Tab title="Blacklist">
    Blocks popular public domains - over **60 domains** are blocked, including:

    | Category          | Example domains                                 |
    | ----------------- | ----------------------------------------------- |
    | **International** | gmail.com, outlook.com, yahoo.com, hotmail.com  |
    | **Polish**        | onet.pl, wp.pl, o2.pl, interia.pl, tlen.pl      |
    | **German**        | gmx.de, web.de, t-online.de                     |
    | **Privacy**       | protonmail.com, tutanota.com                    |
    | **Temporary**     | tempmail.com, mailinator.com, guerrillamail.com |

    **When to use:** Corporate training where you want to enforce company emails, but don't want to manually define allowed domains.
  </Tab>

  <Tab title="Whitelist">
    Accepts **only** addresses from specified domains. Enter a comma-separated list of domains:

    ```
    company.com, corp.org, dept.company.com
    ```

    Domains are automatically:

    * Converted to lowercase
    * Trimmed of whitespace
    * Deduplicated

    **When to use:** Closed corporate training, quizzes available only to employees of a specific organization.

    <Warning>
      The whitelist must contain **at least one domain**. An empty whitelist will block all participants (fail-closed).
    </Warning>
  </Tab>
</Tabs>

### Skip option

You can enable the **"Allow skipping the form"** option, which adds a "Skip" button to the form.

* Participant must confirm skipping in a dialog
* In the report, participant is marked as "Form skipped"
* Data fields (first name, last name, email) remain empty

<Info>
  **When to enable skipping?** When you want to encourage data submission but don't want to block access for those who don't want to share. E.g., open public events.
</Info>

## Participant form

### When does it appear?

The form is displayed **after entering nickname and choosing avatar**, and **before entering the lobby**:

<Steps>
  <Step title="Participant enters PIN code" icon="keyboard">
    Standard step for joining a quiz.
  </Step>

  <Step title="Nickname and avatar selection" icon="user">
    Participant chooses a nickname and avatar.
  </Step>

  <Step title="Data form" icon="address-card">
    If data collection is enabled - the form appears.
  </Step>

  <Step title="Lobby" icon="users">
    After filling out (or skipping) - participant enters the lobby.
  </Step>
</Steps>

### Form structure

The form contains the following elements:

| Element               | Type     | Required | Description                                 |
| --------------------- | -------- | -------- | ------------------------------------------- |
| **First name**        | Text     | Yes      | 2-100 characters, autocomplete: given-name  |
| **Last name**         | Text     | Yes      | 2-100 characters, autocomplete: family-name |
| **Email**             | Email    | Yes      | Format validation + domain filtering        |
| **Marketing consent** | Checkbox | No       | Text defined by organizer                   |

<Info>
  The form is **responsive** and works on phones, tablets, and computers. Fields have autocomplete enabled, which speeds up filling on mobile devices.
</Info>

### Validation

The form is validated at two levels:

**Client-side (JavaScript):**

* Check that fields are not empty
* Email format validation (HTML5)
* Immediate error feedback

**Server-side (PHP):**

* First and last name length (2-100 characters, UTF-8)
* Email format (`filter_var` with `FILTER_VALIDATE_EMAIL`)
* Email domain validation (blacklist/whitelist)
* CSRF token

Error messages are displayed below the respective form field.

### "Skip" button

If the organizer enabled the skip option:

* A "Skip" button appears below the form
* Clicking opens a confirmation dialog
* After confirming, participant proceeds to lobby without providing data
* Shown as "Form skipped" in the report

## Data report

### Accessing the report

After the session ends, in the **Reports** section a **"Data collection"** button appears with export options:

<CardGroup cols={2}>
  <Card title="PDF report" icon="file-pdf">
    Formatted document with participant data, statistics, and consent statuses. Perfect for printing and archiving.
  </Card>

  <Card title="Excel report" icon="file-excel">
    Spreadsheet with raw data for further processing - import into CRM, mailing tool, attendance sheet.
  </Card>
</CardGroup>

### Report statistics

The PDF report includes a statistics section:

| Metric                     | Description                       |
| -------------------------- | --------------------------------- |
| **Total participants**     | All session participants          |
| **With collected data**    | Participants who filled the form  |
| **Skipped forms**          | Participants who skipped the form |
| **With marketing consent** | Participants who accepted consent |

### Data columns

Both PDF and Excel contain:

* Participant nickname
* First name
* Last name
* Email address
* Marketing consent status (Yes/No)
* Join date
* Notes (column for notes in Excel)

<Info>
  The data collection report is **separate** from the main session report. The export button only appears when data collection was enabled for the given session.
</Info>

## Security and GDPR

### Data responsibility

<Warning>
  As the quiz organizer, you are the **data controller** for collected personal data. Hey Quiz processes data solely on your behalf (data processor).
</Warning>

### Safeguards

| Safeguard                  | Description                                                                 |
| -------------------------- | --------------------------------------------------------------------------- |
| **Consent snapshot**       | Consent text saved at the moment of acceptance                              |
| **CSRF protection**        | Form protected with CSRF token                                              |
| **Server-side validation** | All data validated on the server                                            |
| **Formula injection**      | Excel fields formatted as text (preventing CSV injection)                   |
| **Settings freeze**        | Configuration copied to session at start - cannot be changed during session |

### Data storage

* Data stored in the `participants` table in the database
* Accessible only to the quiz host
* Deleted when the quiz session is deleted
* No interface to edit collected data (data integrity protection)

## Use case examples

### Corporate training

* **Domain filtering:** Whitelist with company domain
* **Skip option:** Disabled (everyone must provide data)
* **Consent:** "I consent to data processing for the purpose of issuing a training completion certificate"
* **Report:** Excel for import into HR system

### Conference / Event

* **Domain filtering:** Blacklist (blocking public domains)
* **Skip option:** Enabled (don't block participants)
* **Consent:** "I consent to receiving information about future events from the organizer"
* **Report:** Excel for import into CRM / mailing tool

### Public quiz / Marketing

* **Domain filtering:** Disabled
* **Skip option:** Disabled (data required)
* **Consent:** "I consent to receiving newsletters and promotional offers from \[Company Name]"
* **Report:** Excel for building mailing list

### Online course / Workshop

* **Domain filtering:** Disabled
* **Skip option:** Disabled
* **Consent:** None (no marketing consent needed)
* **Report:** PDF as attendance list

## FAQ

<AccordionGroup>
  <Accordion title="Can I change data collection settings after starting a session?">
    No. Data collection settings are **copied to the session** when it starts. Later changes to quiz settings don't affect an active session. This ensures data consistency within a single session.
  </Accordion>

  <Accordion title="What if a participant enters fake data?">
    Hey Quiz validates email format and filters domains (if enabled), but doesn't verify participant identity. Data reliability depends on context - in corporate training with domain whitelisting, the risk of fake data is minimal.
  </Accordion>

  <Accordion title="Can a participant edit submitted data?">
    No. After submitting the form, data is saved permanently. The participant should contact the organizer for corrections. This rule protects the integrity of collected data.
  </Accordion>

  <Accordion title="Is the data visible to other participants?">
    No. Personal data is visible **only** to the quiz host in reports. Other participants only see nicknames and avatars.
  </Accordion>

  <Accordion title="What happens to data when I delete the quiz?">
    Participant session data is deleted along with the quiz session. If you need an archive - export the report (PDF/Excel) before deleting.
  </Accordion>

  <Accordion title="Does data collection work in team mode?">
    Yes. The data form appears **before** team selection. Regardless of game mode - participants fill the form after entering their nickname.
  </Accordion>

  <Accordion title="Does the form slow down joining?">
    The form has autocomplete enabled, which on mobile devices allows filling it out in seconds. Participants only provide 3 fields (first name, last name, email) + mandatory checkbox.
  </Accordion>

  <Accordion title="How is this different from the rewards module?">
    **Data collection** gathers information from **all** participants **before** the quiz (at join time). **Rewards module** collects data from **winners** (TOP N) **after** the quiz ends, including shipping address. Both features work independently.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Quiz settings" icon="gear" href="/en/quizzes/settings">
    Full quiz configuration
  </Card>

  <Card title="Reports" icon="chart-pie" href="/en/reports/overview">
    Overview of all reports
  </Card>

  <Card title="Rewards module" icon="gift" href="/en/rewards/overview">
    Collecting data from winners
  </Card>

  <Card title="Joining a quiz" icon="right-to-bracket" href="/en/participants/joining">
    Participant perspective
  </Card>
</CardGroup>
