DocsOpen Henkan Research
Recruit participants

On-site invitations

Install one snippet on the client's website and invite visitors to an interview on the pages and at the moment you choose.

Up to date with v1.2.1Updated 18 October 20263 min read

On-site recruitment shows a small invitation to the client's website visitors, for example on the cart page. Visitors who accept go straight to the interview, in a new tab or over the page.

Install the code#

The code to install, the same for every campaign of the study.
The code to install, the same for every campaign of the study.
1
Your code. Paste it once, before the closing body tag of every page.
2
Tag managers. Instructions for Google Tag Manager and cookie consent.
3
Preview on my site. Shows the invitation on a real page, ignoring the rules.
  1. Open the method In the Recruitment tab, select Recruit on your site.
  2. Copy the code Copy Code to paste before the </body> tag. It looks like this:
<script async src="https://research.henkanpartners.ai/r.js" data-study="7c4e1a9b2d"></script>
  1. Install it Paste it on every page of the site. With Google Tag Manager: Tags, New, Custom HTML tag, paste the code, trigger All Pages, then publish.
  2. Allow the domain In the campaign, list the site's domain under Allowed domains (see below). The code only works on these domains and their subdomains.

The script is lightweight, loads asynchronously and keeps its styles separate from the site's.

To keep the invitation off until the visitor accepts cookies, add data-consent="false" to the script tag and remove it after consent. The invitation is also never shown to visitors whose browser sends Do Not Track or Global Privacy Control.

Open the invitation from your own code#

Set a campaign's trigger to Only from your code (HenkanResearch.show), then call it from the site, for example after a purchase:

HenkanResearch.show();                 // first eligible campaign
HenkanResearch.show("campaign-id");    // a specific campaign

The campaign ID is shown at the bottom of each campaign, after ID for HenkanResearch.show.

Create a campaign#

A campaign sets the invitation's look and text, the pages and the moment it appears. A study can have several campaigns.

Campaigns of the demo study and the results of the selected one.
Campaigns of the demo study and the results of the selected one.
1
New campaign. Creates a campaign with default text and rules.
2
Selected campaign. Select a campaign's name to edit it below.
3
Results. Impressions, clicks, interviews started and completed, per page.
  1. Create Select New campaign (or Create a campaign). It starts active, with the domains of your first campaign. Creating a campaign completes the Choose who to interview step.
  2. Design the invitation Choose a template and write the text (see below).
  3. Set the rules Choose the pages, the trigger and the share of visitors.
  4. Check the preview The preview updates live, on desktop or mobile.

To pause a campaign, set State to Paused. Delete removes the campaign and its statistics.

Invitation#

The invitation editor of the selected campaign.
The invitation editor of the selected campaign.
1
State. Active or Paused.
2
Template. Bottom-right card, centred window, thin banner or side tab.
3
Text language. Write the English and French text separately.
4
Incentive. Optional thank-you, such as a €10 voucher.
SettingOptions
TemplateBottom-right card, Centred window, Thin banner (top or bottom of the page), Side tab
Title, Text, Main button, Decline buttonYour wording, in English and in French
Thank-you incentive (optional)For example "A €10 voucher to thank you." Leave empty if there is none.
Display languageAutomatic (from the page language), Always English, Always French
Interview opensIn a new tab or Over the site page
The live preview, in mobile format.
The live preview, in mobile format.
1
Desktop or Mobile. Switches the preview format.
2
Live preview. Runs the real script, exactly as visitors will see it.

The invitation always adds a notice: "Short interview led by an AI assistant. Nothing is recorded without your consent." The logo and colour come from the study's branding on the Launch the study step.

Where and when to show it#

Page rules, trigger, devices, sampling and allowed domains.
Page rules, trigger, devices, sampling and allowed domains.
1
Pages. Show only on, or never show on, pages matching a rule.
2
Trigger. When the invitation appears.
3
Share of visitors. Shows the invitation to a random share of visitors.
4
Allowed domains. The sites where the code is allowed to run.
SettingOptionsDefault
Show only on these pagesRules: contains, equals or regex, for example contains /cart. Empty means all pages.All pages
Never show on these pagesSame rules, for example contains /accountNone
When to showAfter a few seconds, After scrolling a percentage of the page, When the visitor is about to leave (desktop), After several pages viewed, Only from your code (HenkanResearch.show)After 10 seconds
DevicesAll, Desktop, MobileAll
Share of visitors (%)1 to 100100
Do not show again for (days)After a decline or a participation30
Allowed domainsOne per line, for example www.example.com. Subdomains are included.Required

The invitation stops by itself when the study is closed or when the target number of interviews is reached.

Troubleshooting the snippet#

If the invitation does not appear, open the browser console on the site: the script explains why, for example domain not allowed, study not open, interview target reached, recently dismissed, or disabled by data-consent="false" or Do Not Track. See also Troubleshooting.