Documentation

Everything you need to set up Askertain and start collecting real attribution data from your customers.

Quick Start

You can be live in under 5 minutes. Create a project, build an interceptor, and paste one script tag into your site.

  1. Sign up and create your first workspace and project.
  2. Create an interceptor and configure your question and trigger.
  3. Copy the embed script and paste it before the closing </body> tag on your site.
  4. Watch responses appear in real time.

Installing the Script

Each project has a unique embed script. Find it in your project settings under Embed Code.

<script src="https://cdn.askertain.com/e.js" data-pid="YOUR_PROJECT_ID" async></script>

The script is lightweight (<5kb gzipped), loads asynchronously, and has no impact on page performance.

Creating an Interceptor

An interceptor is a question shown to your visitors at a specific moment. To create one, navigate to your project and click New Interceptor.

Each interceptor has a question, one or more answer options (or a free-text field), a trigger, and targeting rules.

Question Types

Multiple Choice

Offer 2–6 predefined options. Best for attribution sources, decision factors, and categorized feedback.

Free Text

Open-ended responses. Best for "why" questions where you want unbiased answers.

Multiple Choice + Other

Combines options with a free-text fallback so you never miss an unexpected answer.

Triggers & Targeting

Triggers determine when the interceptor appears. Targeting rules determine who sees it.

Available triggers

  • Page load
  • Time on page (e.g., after 30 seconds)
  • Scroll depth (e.g., after scrolling 50%)
  • Exit intent
  • Custom event (via JavaScript API)

Targeting options

  • URL match (exact, contains, regex)
  • Device type (desktop, mobile, tablet)
  • Visitor type (new, returning)
  • Referrer
  • URL query parameters

Frequency Controls

Control how often a visitor sees an interceptor to avoid survey fatigue.

  • Once per session — resets when the browser session ends.
  • Once per visitor — never shown again after the first view (uses localStorage).
  • Always — shown every time the trigger fires (use sparingly).

Viewing Responses

Responses appear in the Responses tab of your interceptor in real time. You can filter by date range and see breakdowns for multiple-choice questions.

Exporting Data

Export responses as CSV from the Responses tab. API access for programmatic exports is available on Pro and Enterprise plans.

Integrations

Send response data to your other tools via webhooks or native integrations. Find available integrations in your project's Integrations tab.

Webhooks

Configure a webhook URL and Askertain will POST a JSON payload to it every time a response is submitted.

{
  "event": "response.created",
  "interceptor_id": "int_abc123",
  "project_id": "proj_xyz456",
  "response": {
    "answer": "Social media",
    "submitted_at": "2026-02-20T10:00:00Z"
  }
}

API Authentication

All API requests require a Bearer token. Generate one in your workspace settings under API Keys.

Authorization: Bearer ak_live_...

API Endpoints

Base URL: https://api.askertain.com/v1

GET/projectsList all projects
GET/projects/:id/interceptorsList interceptors for a project
GET/interceptors/:id/responsesList responses for an interceptor