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.
Surveys are visible on every plan. Free, Growth 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 a quick scroll back up and the return to the tab after the visitor left it. The timer defaults to 45 seconds and counts the time the page was actually in view, from the moment it loaded: time in a background tab does not count. The leaving triggers (exit intent, scroll up, return to the tab) wait until the page was in view for 10 seconds. A survey never opens, and no impression is counted, in a tab nobody is looking at. 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 shows the survey over a sample product page, on desktop and on mobile. Full preview enlarges it to a real desktop viewport, so the size and position are the ones a visitor gets. Open on my store opens a page of your store in a new tab with the survey shown at once, exactly as it is set up in the builder, saved or not. The preview link works for one hour and only for you. Preview responses do not count toward reports or limits.
Placement decides how the survey appears on desktop. The corner card is a small card in the bottom corner that leaves the page fully usable. The centred popup is a larger window in the middle of the screen over a dimmed page; it closes with the X, with Escape, or with a click outside it. On mobile both are a sheet at the bottom of the screen, and the popup dims the page behind it. Size (small, medium, large) scales the widget and its text. Neither placement intercepts the back button or forces navigation.
The look, the placement, the size and the display rules can be changed at any time, also after the first response. Questions, texts, targeting and the reward are locked once responses arrive, so every answer stays comparable.
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();
}
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. The corner card and the mobile bottom sheet never cover the page. The centred popup dims the page but stays dismissible with one click, never intercepts the back button and never forces navigation; show it after a delay, not the moment the page loads.
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.