Create targeted storefront surveys, collect product feedback, and issue optional rewards with AxiTrace.

You can also create and edit surveys and templates from AI or REST. See the Survey API and MCP reference for every field, question operations, rewards and results.

Customer Surveys

Ask short questions on product pages, learn why visitors hesitate, and connect each answer to the product and campaign context already collected by AxiTrace.

Availability and monthly limits

Surveys are visible on every plan. Free and legacy Starter cannot collect responses. Pro includes 500 completed responses per month, Business includes 2,000, and Custom is unlimited. At the limit, surveys stay hidden until the first day of the next month.

Build a survey

Open Optimize > Surveys. A survey supports one to five questions. Keeping it to one to three usually produces the best completion rate.

  • Short text for a compact free-form answer.
  • Long text for detailed feedback.
  • Single choice for one answer from two to ten options.
  • Multiple choice for several answers. The Purchase blockers starter uses this type.

The widget never asks for an email address. Private notes are visible only to workspace users and are never included in the storefront manifest.

Targeting

Targets are evaluated in this order: merchant item ID, SKU, category, then a URL path regular expression. A survey can also target products served by a synced Google Ads Shopping or Performance Max campaign. Higher target specificity wins, then survey priority.

Axitrace.track('product.view', {
  merchant_item_id: 'shop-product-4821',
  sku: 'CHAIR-OAK-42',
  category: 'Dining chairs'
});

If you use the GA4 dataLayer bridge, GA4 item_id maps to AxiTrace merchant_item_id. Use the same value that your product feed and campaign use.

Triggers, frequency, and consent

The default desktop trigger is exit intent. Mobile uses upward scrolling and page visibility changes. The timer defaults to 45 seconds. Surveys are hidden on cart, checkout, payment, and order pages. By default they are also hidden for 30 days after dismissal, capped to one display every 30 days, and hidden from known buyers for 30 days.

The module follows the workspace consent policy. When marketing consent is required, the SDK does not load it or send survey events until the visitor grants consent. Dismissal is stored in first-party browser storage so the frequency rule survives a reload.

Preview and storefront design

The builder has desktop and mobile previews. Preview on my store creates a one-hour preview link for the workspace's default domain. Preview responses do not count toward reports or limits.

The widget is a dismissible corner card on desktop and a bottom sheet on mobile. It does not become a full-page overlay, intercept the back button, or force navigation.

Content Security Policy

Your existing AxiTrace script-src and connect-src entries for the tracking domain cover the survey module and requests. The module uses a constructable CSSStyleSheet in its Shadow DOM when supported. Older browsers fall back to an inline Shadow DOM <style>. A strict style-src 'none' policy can block that fallback, so allow inline styles or an appropriate nonce policy for browsers without constructable stylesheets.

Templates

The module has two tabs: Surveys and Templates. Every workspace starts with three editable templates:

  • Purchase blockers on the product page, including a required multiple-choice blocker question.
  • Missing product information.
  • Visit intent and comparison.

The Use template button sends a CSRF-protected request that creates a draft and opens it for editing. Opening the new-survey page with a template selected shows a read-only prefill first; submitting that form creates the draft. Both flows leave the template unchanged. Save as template copies content from any survey, including a locked survey. Restore starter templates recreates deleted starters.

Templates contain questions, storefront strings, styling, display rules, and reward messages. They do not contain targets, a reward provider, endpoint credentials, or a code pool.

Optional rewards

A completed survey can return a discount code from an uploaded CSV pool or from your HTTPS merchant endpoint. If the endpoint fails, AxiTrace tries the CSV pool when available. Reward configuration and secrets are never exposed in the public manifest.

Merchant endpoint contract

AxiTrace sends one POST request with Content-Type: application/json, X-AxiTrace-Timestamp, and X-AxiTrace-Signature: sha256=<hex>. The signature is HMAC-SHA256 of timestamp.rawBody, using the write-only secret configured in the dashboard.

{
  "request_id": "123e4567-e89b-42d3-a456-426614174000",
  "survey_id": "s_7f3a9k2m1q",
  "percentage": 10,
  "valid_days": 7,
  "issued_at": "2026-10-09T10:00:00Z"
}

Treat request_id as an idempotency key and return the same result if repeated. Verify that the timestamp is no more than five minutes old. A successful response must contain a code and an RFC 3339 expiry:

{"code":"SAVE10","expires_at":"2026-10-16T10:00:00Z"}

PHP signature verification

$rawBody = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_AXITRACE_TIMESTAMP'] ?? '';
$received = $_SERVER['HTTP_X_AXITRACE_SIGNATURE'] ?? '';
$timestampIsFresh = ctype_digit($timestamp)
    && abs(time() - (int) $timestamp) <= 300;
$expected = 'sha256=' . hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret);
if (!$timestampIsFresh || !hash_equals($expected, $received)) {
    http_response_code(401);
    exit;
}

Node.js signature verification

import crypto from 'node:crypto';
const timestampIsFresh = /^\d+$/.test(timestamp)
  && Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp)) <= 300;
const expected = 'sha256=' + crypto.createHmac('sha256', secret)
  .update(timestamp + '.' + rawBody).digest('hex');
const expectedBytes = Buffer.from(expected);
const receivedBytes = Buffer.from(received);
const signatureMatches = expectedBytes.length === receivedBytes.length
  && crypto.timingSafeEqual(expectedBytes, receivedBytes);
if (!timestampIsFresh || !signatureMatches) {
  response.writeHead(401).end();
}
Endpoint network requirements

The endpoint must use HTTPS on port 443, resolve to a public IP address, and have a valid TLS certificate. AxiTrace pins the vetted DNS result, does not follow redirects, waits at most three seconds, and makes one attempt. Keep the operation idempotent because the visitor can retry a failed survey submission.

Platform notes

Shopify: storefront surveys are not currently supported in Shopify's sandboxed Web Pixel environment. Shopify conversion tracking continues independently.

Google Ads: keep the widget as supplied. It is a dismissible corner card or mobile bottom sheet and does not use a full-page overlay, back-button interception, or forced navigation.

Answers and retention

Survey answers help the merchant understand purchase barriers and improve products, pages, and campaigns. They are stored as event data for the workspace plan's retention period. The merchant determines the questions and purpose and is the data controller; AxiTrace processes answers on the merchant's behalf. Survey field types do not include an email field.