NudgeDocs

Suggested questions

How the widget picks the questions it offers on each page and section, how to set your own, and how to write them directly in your HTML.

Two places, two rules

Before the visitor types anything, the widget suggests questions in two places:

  1. In the bar, at rest: one question, taken from what the visitor is reading right now. If neither the section on screen nor the page has a question, the bar shows its prompt text instead.
  2. When the visitor clicks into the bar (and in the panel before the first message): up to three starter questions. One click sends the question and the conversation starts.

Questions that are not in the visitor's language are skipped: a visitor in another language sees the questions written in theirs, or the translated defaults.

Where the questions come from

The widget uses five sources, from the most specific to the most general:

SourceWhere it is set
SectionThe questions of the section the visitor is reading: written by Nudge for each section when it reads your site, or written in your page with data-nudge-questions.
PageThe questions of the whole page, written by Nudge when you switch them on for that page.
Your questionsThe Starter questions of the widget, on the Appearance screen.
SiteThe site-wide Suggested questions in Agents › Shared memory › Tone, proposed by the read of your site.
GenericThree generic questions, as a last resort.

In the bar, at rest

The bar shows the first question of the section on screen, or else the first question of the page. Nothing else is used here: the bar only speaks when it has something specific to the page.

When the visitor clicks into the bar

The section's questions come first. Then the widget completes with one list: the first that exists among Page → Your questions → Site → Generic.

These lists do not add up. A page with its own questions replaces your starter questions on that page; your starter questions replace the site's; and so on.

On a computer, the starters must fit on one line: when three questions are too long together, only the first two are shown. On a phone they are stacked, so all three show.

See it for any page

On the Appearance screen, the panel What the widget offers here, under the live preview, shows for the page and section you pick which question sits in the bar, which starters appear, and where each one comes from. Click a section to scroll the preview to it.

Set your questions

Your starter questions

On Agents › Website Agent › Customise (the Appearance screen), the Starter questions card holds up to three questions. Write them in your visitors' words, for example "How much does a redesign cost?", and only ask what your knowledge base can answer. Click Publish to put them online.

Tick Also offer them on the page, before the widget opens to show them as buttons on the page itself.

Questions per page

In Agents › Shared memory › Sources, each website page has a question-bubble button. Click it to have Nudge write opening questions for that page. The tooltip says This page opens on its own questions once they exist. If nothing could be written for the page, it says so: click again to retry.

Choose the pages that deserve their own questions (pricing, a service page, a product page) rather than all of them.

Questions per section

Nudge writes questions for each section of a page when it reads your site, and rewrites them when the page changes. Nothing to do on your side. To control a section yourself, use the HTML attributes below.

Site questions

The site-wide Suggested questions (up to four, in Tone) are proposed by the read of your site and editable there. They are used when a page has no questions of its own and you have written no starter questions.

Write questions in your HTML

How the widget finds the section on screen

When the visitor stops scrolling, the widget looks at the element under a reading line at 40% of the window height and takes the closest of:

  • an element with data-nudge-section or data-nudge-questions,
  • a <section> element.

The section is named by its data-nudge-section attribute, or else by its first h1, h2 or h3. On a page without sections, the widget uses the last heading the visitor scrolled past.

The widget only sends the heading of the section to Nudge, never the text displayed in the page, which could contain the data of a signed-in visitor.

Write the questions of a section

Add data-nudge-questions to the section, with questions separated by |:

<section data-nudge-questions="How much does it cost? | And for a team of 10?">
  <h2>Pricing</h2>
  …
</section>
  • At most three questions, 200 characters each. The first one goes in the bar.
  • An empty attribute means "no question here": the bar shows no question while this section is on screen.
<section data-nudge-questions="">
  <h2>Customer logos</h2>
</section>

Name a section

When the visible heading says little ("Why us?", an icon, no heading at all), name the section with data-nudge-section:

<div data-nudge-section="Integrations">
  …
</div>

The questions Nudge wrote for a section are found by its heading, as it appears on the page Nudge read: use the same wording as a heading of that page.

Ask a question from your page

A button or a link of your page can open the chat with a question already asked:

<button data-nudge-ask="Can I try it for free?">Try it for free</button>

Without a value, the element's text is the question. It also works for elements your page adds later (tabs, FAQs loaded afterwards). From your own code:

window.Nudge.ask('Can I try it for free?')

The panel opens and the question is sent as if the visitor had typed it.

Tips

  • Write questions the way a visitor would type them, not as marketing headlines.
  • Keep them short: three short questions show on one line; long ones lose the third.
  • Only suggest questions your knowledge base can answer. Check Unanswered questions after a change.
  • Hide questions on sections where a question would distract (logos, legal notices) with an empty data-nudge-questions.

On this page