Set up a website widget
Add a website widget to your website and choose where and when it shows.
- You need admin access to do this. About roles
A website widget asks visitors on your website for feedback. It belongs to a website. After you add it, create a website widget stream for it. See Set up a website widget stream.
Install the script on your website
Open the settings of your website. The Installation step shows Add this snippet to your website.
- Copy the JavaScript snippet.
- Paste it just before the closing
</body>tag on every page where the widget may show. - For the best mobile experience, also copy the
<meta>tag and paste it in the<head>tag.
Add the widget
- Go to Admin in the sidebar and open the Touchpoints tab.
- Pick your website.
- Click Add touchpoint and choose Website widget.
- Under Enter a Subscription ID, enter the Subscription ID. You get it from Yump.
- Under Enter a name for this widget, enter a Widget name. For example: "Support pages".
- Choose where, when and in which position the widget shows (see below).
- Under Select language mode, choose the language. See Set your survey language.
- To change colors and fonts, open the Design tab. See Customize your survey design.
- Click Add. The widget is saved at once.
You can also add a widget in the website's settings, on the Touchpoints step. Click Add touchpoint and choose Website widget. There, the widget is saved when you save the website.
Choose where to display
Under Choose where to display, pick one:
| Option | What it does |
|---|---|
| On all pages | The widget can show on every page with the script. A new widget starts here. |
| On some pages | The widget shows only on the pages you list. |
| Using JavaScript | The widget shows when your own code calls it. |
With On some pages, fill in Only show widget if URL (e.g. www.acme.com) contains. To leave out some of those pages, use Do not show widget if URL contains. Pages you hide must be inside a page you show.
With Using JavaScript, copy the call under Copy and paste the following JS call whenever you want the widget to show. It looks like window.oiwidgets.show('WIDGET_ID'). Put it in your code where the widget should show.
On some pages and Using JavaScript are premium features (advanced triggers). If they are turned off, your subscription does not include them.
A widget with Using JavaScript is a manual widget. The other two give an automatic widget. In the website's settings, the Type column shows "Manual" or "Automatic".
Choose when to show
This setting is not shown for Using JavaScript. Under Choose when to show, pick one:
| Option | What it does |
|---|---|
| Directly | The widget shows when the page loads. A new widget starts here. |
| After load | The widget shows a number of seconds after the page loads. |
| After the respondent has been inactive | The widget shows after the visitor has been inactive for a number of seconds. |
For the last two, set the seconds with the slider, from 1 to 600.
Choose the position
Under Choose the position, pick Top left, Top right, Bottom right, Bottom left, Center or Manually. A new widget starts on Bottom right.
Pass respondent data to the widget
You can send data about the respondent with the widget. Add it as an object in the init() call of the script. It then applies to every widget on the page:
window.oiwidgets.init(WEBSITE_ID, u, { email: 'anna@example.com', cid: 'MEMBER-4521' });
For a manual widget, you can also add it to the show() call. It is merged with the data from init():
window.oiwidgets.show('WIDGET_ID', { email: 'anna@example.com' });
Yump knows these names: first_name, last_name, email, phone and cid (custom ID).
Response frequency can use email, phone and cid to recognize a person who already responded. See Limit how often someone can respond.
Good to know
Changes can take up to 20 minutes
When you add a widget or make a change, it can take up to 20 minutes before the change is visible on your website.
Deleting a widget deletes its results
To delete a widget, pick it on the Touchpoints tab and click Delete. All its results are deleted too. This can't be undone.