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

# Product Feedback and NPS Surveys

> Collect NPS, rating, or open feedback inside your site with a targeted survey widget that uses the existing tinyanalytics tracking script.

A survey asks your visitors a question without sending them anywhere — an NPS score, a star rating, a line of open feedback — using a widget tinyanalytics shows inside your site. You build the questions in the dashboard. The widget, targeting, and results all work off your existing [tracking snippet](/docs/install-tinyanalytics-tracking-script), so there's **no extra code to add**.

## How do I turn surveys on?

Enable surveys for the site first. Surveys are **off by default** for a new site, and until you enable them, drafting a survey alone won't put anything in front of visitors — the widget code never loads. This keeps the tracker lean for sites that don't use surveys.

## What question types can a survey ask?

A survey is a sequence of questions. Each question is one of these types:

| Question type       | Asks for                               | Reports                               |
| ------------------- | -------------------------------------- | ------------------------------------- |
| **Rating**          | a score on a scale                     | a distribution and a weighted average |
| **NPS**             | a 0–10 "how likely to recommend" score | your Net Promoter Score               |
| **Single choice**   | one option from a list                 | counts per option                     |
| **Multiple choice** | any options from a list                | counts per option                     |
| **Open text**       | a free-text answer                     | every response, verbatim              |
| **Link**            | a click through to a URL               | click and completion counts           |

<Note>
  Survey text is rendered as **plain text only** — the widget never interprets HTML, so a survey can't inject markup into your page.
</Note>

## How does branching work?

Branching decides which question comes next, so respondents only see what's relevant:

| Branch                  | What happens                                                                   |
| ----------------------- | ------------------------------------------------------------------------------ |
| **Next question**       | advance in order (the default)                                                 |
| **Jump to a question**  | skip ahead to a specific question                                              |
| **Based on the answer** | send detractors, passives, and promoters (or each choice) down different paths |
| **End**                 | show the thank-you screen and finish                                           |

## Who sees a survey, and when?

Targeting keeps a survey in front of the right visitors. A survey can be limited by:

* **URL** — show it only on matching pages (exact, contains, does-not-contain, or regex).
* **CSS selector** — require a specific element to be present on the page.
* **Device type** — desktop, mobile, or tablet.
* **Wait period** — don't ask the same visitor again for a number of days.
* **A feature flag** — show it only to visitors a [feature flag](/docs/feature-flag-analytics) targets, so you can survey a specific cohort.

URL targeting re-checks on client-side navigation, so a survey scoped to one route still appears in a single-page app after the visitor navigates to it.

<Note>
  Surveys store wait-period, seen, and completion markers in the browser so they can delay or suppress repeat prompts. Review [Privacy & GDPR](/docs/resources/privacy-friendly-analytics-gdpr) when assessing consent requirements.
</Note>

## What do the survey results show?

The survey's results page reports over its lifetime:

* **Completion rate** and **dismissal rate** — how many people who saw it finished or closed it.
* **Per-question distributions** — the spread of ratings and choices, plus a feed of open-text answers.
* **NPS score** — for an NPS question, your score from −100 to 100, calculated as the share of promoters (9–10) minus the share of detractors (0–6).

You can set a **response limit** so a survey stops itself automatically once it has collected enough answers.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why isn't my tinyanalytics survey showing on my site?">
    Surveys are **off by default** for a new site, so check that surveys are enabled for the site. Until you enable them, drafting a survey alone won't put anything in front of visitors and the widget code never loads. Also check the survey's targeting rules — URL, CSS selector, device type, wait period, and feature-flag conditions all limit who sees it.
  </Accordion>

  <Accordion title="Do I need to add code to my site to run a survey?">
    No. tinyanalytics surveys need **no extra code beyond your tracking snippet**. You build the questions in the dashboard, and the widget, targeting, and results all work off the [tracking snippet](/docs/install-tinyanalytics-tracking-script) you already installed.
  </Accordion>

  <Accordion title="How does tinyanalytics calculate the NPS score?">
    tinyanalytics takes the share of promoters (visitors answering 9–10) and subtracts the share of detractors (0–6), producing a score from −100 to 100. NPS questions ask a 0–10 "how likely to recommend" question.
  </Accordion>

  <Accordion title="Do surveys work in single-page apps?">
    Yes. URL targeting re-checks on client-side navigation, so a survey scoped to one route still appears in a single-page app after the visitor navigates to that route.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Feature flags" icon="toggle-on" href="/docs/feature-flag-analytics">
    Target a survey at a specific cohort of visitors.
  </Card>

  <Card title="Events explorer" icon="bolt" href="/docs/event-analytics">
    Survey responses arrive as events you can explore.
  </Card>

  <Card title="Identify users" icon="user" href="/docs/user-identification-analytics">
    Tie feedback to the people who gave it.
  </Card>

  <Card title="Custom dashboards" icon="table-cells-large" href="/docs/custom-analytics-dashboards">
    Chart survey results alongside your other metrics.
  </Card>
</Columns>


## Related topics

- [Privacy-Friendly Web and Product Analytics](/docs/index.md)
- [AI Analytics Assistant](/docs/ai-analytics-assistant.md)
- [tinyanalytics vs Google Analytics, Plausible, and Umami](/docs/resources/tinyanalytics-vs-google-analytics-plausible-umami.md)
