Sign inGet started
Tracking

Post-conversion survey

View as MarkdownOpen in ChatGPTOpen in Claude
Connect your agent
Add to CursorAdd to VS Code

The tag asks "How did you hear about us?" right after a purchase or sign-up, and your agent reads the answers beside the channel it attributed.

Updated

The post-conversion survey is one question the tag asks right after someone converts: "How did you hear about us?" It's off until you switch it on. Your agent then sees conversions and revenue by what people said, next to the channel nextanalytica gave the same visits.

Attribution sees the last click. People often heard of you first somewhere else, from ChatGPT, a friend or a video, and came later by typing your address. The survey asks them, once.

How do I switch it on?

In the app, open Site > Settings and set Ask how they heard about you to After each conversion. Pages pick it up within minutes. Owners and admins can change it; everyone on the project sees it.

Or ask your agent: "Ask our buyers how they heard about us." It calls set_survey, after asking you first. See MCP tools.

The survey is on the Business plan: switching it on for the first time starts the project's 14-day trial. See Plans.

When does it ask?

Right after a conversion on the page where it happens, never on a plain visit:

ConversionAsked when
An orderorder() is sent, or an order arrives from Google's dataLayer
A custom eventtrack() sends the event your conversion names
A formThe form is sent (a form only started doesn't count)
A pageSomeone lands on the page, such as /thank-you
A clickSomeone clicks what the click conversion names

An order always asks. Every other kind asks once it's in your project's conversions; your agent sets them with set_conversions, see Custom events.

What does the visitor see?

A small card in the bottom right corner of the page, over nothing that matters and without moving anything on it. It has the question and six choices:

  • Google search
  • ChatGPT or another AI assistant
  • Instagram or Facebook
  • TikTok or YouTube
  • A friend or colleague
  • Other

The first five come in a new order each time, so no choice wins by being first. Other is always last and opens a short text field. One click sends the answer, and the card says thank you and closes. Escape or the close button dismisses it with nothing sent.

The card works with the keyboard and screen readers, and it doesn't animate for people who ask their system for reduced motion. It follows the visitor's light or dark mode.

How often is someone asked?

At most once every 90 days, and never after a no:

The visitorWhat the tag remembers
Agreed to cookiesThe time they were asked, na_q, on the device for 90 days
Hasn't answered your bannerThe same, in the open tab only, gone when the tab closes
Said no, or sends Global Privacy ControlNothing: they're never asked

A no from your banner later removes na_q with every other key the tag keeps. See Cookieless counting and consent.

Which language does it use?

Your site's. The tag reads data-survey-lang on its line first, then your page's <html lang>, then the browser's language when the page sets none. It speaks Arabic, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Korean, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish, Swedish, Turkish and Ukrainian. Any other language gets English. In Arabic and Hebrew the card reads right to left, in the bottom left corner.

To choose the language yourself, add it to the tag's line:

<script async src="https://t.nextanalytica.app/t.js" data-project="na_…" data-survey-lang="it"></script>

Can I change the words?

Yes. Set window.nextanalyticaSurvey before the conversion, with any of these strings:

checkout.html
<script>
  window.nextanalyticaSurvey = {
    question: "Who told you about us?",
    choices: { friend: "A friend, a colleague or family" },
    thanks: "Thanks, that helps a lot!"
  };
</script>

The keys are question, choices (with google, ai, meta, video, friend and other), send, close, placeholder and thanks. What you leave out stays ours. Each string is shown as text, never as HTML. The answer your agent reads keeps the original choice, so your words don't change the numbers.

What is sent?

One event, heard_from, in the same visit as the conversion, with these properties:

PropertyWhat it holds
answerThe choice in English, such as Google search, or the words typed for Other
choicegoogle, ai, meta, video, friend or other
conversionThe key of the conversion it followed, such as purchase
refThe order's reference, when the conversion was an order
langThe language the card was in

Typed words are cut at 100 characters, and emails and phone numbers are taken out before anything is stored. nextanalytica reads an AI assistant named in the answer as heard_ai, as for any heard_from answer; the choice "ChatGPT or another AI assistant" counts as one too.

What does my agent see?

get_dashboard has a heard_from block: for each answer, the people, their conversions and revenue, and the channels nextanalytica attributed to those same visits. Read the two side by side: a row that says "ChatGPT or another AI assistant" with Direct as its channel is a sale your attribution can't see. The block also says how many of the period's conversions had an answer, and the most common words typed for Other.

Answers sent by your own form or checkout as heard_from count in the same block. People who chose an AI assistant also count as self_reported in the AI chain.

Does it slow my site down?

No. The tag itself grew by about 0.3 KB compressed. The card's code, about 4.5 KB compressed, and its words in one language, about 0.3 KB, load only after a conversion, and only when the survey is on.

What about Shopify?

On Shopify the order confirmation page is Shopify's own, and the tag doesn't ask there yet. A survey on that page is planned.

Next steps

Related
  • What the tag collects: Page views, clicks, forms, scroll, errors and page speed, counted without code. What never leaves the page.
  • Add the tag: Put one script line in the head of every page. Where it goes in plain HTML, site builders and each framework.
  • Next.js analytics: Add analytics to Next.js with @nextanalytica/tag: install, events, consent and AI crawlers, counted without cookies until a yes and read by your agent.
  • Next.js custom events: Send custom events from a Next.js app with @nextanalytica/tag: sign-ups, demo requests and conversions your agent reads by channel.
  • Next.js cookie consent: Wire a cookie banner in Next.js to analytics: count without cookies until the answer, and pass the saved answer on every page.
  • Next.js revenue tracking: Record orders in a Next.js app, from the browser or from your server, so revenue ties to the visit, channel and campaign it came from.
Still have questions?
Was this page useful?