Collect responses with a web widget
A web widget is usually a small survey displayed as a floating object that can be placed on your website or inside a mobile app. The widget can have any shape and size. Usually, it is 320 px but you can scale it to your needs.

You can display a widget at any moment e.g. after a certain amount of time or after certain actions performed by your website user.
Triggers :
- Display widget after a certain amount of time.
- Display widget after a page scroll by a certain number of px.
- Display widget in an attempt to leave a page.
- Display widget if the page URL contains certain keywords.
To create a web widget :
- Select a survey for which you want to collect responses and press
COLLECT RESPONSES button.

- Press + ADD COLLECTOR button.

- Select Widget distribution method.

- Press
Collector inactive button to activate the collector.
- Copy the widget code and paste it into the BODY section of the website you want to display the widget.
- If you want to add data to the widget, after the MSL.cId place additional code :
MSL.respondent = {
firstName: "Artur",
custom1: "test"
};
Example
<script>
var MSL = MSL || { };
MSL.cId = '44dc9a5d0e8098d5f52e47d645128749168f19c67';
MSL.respondent = {
firstName: "Artur",
custom1: "test"
};
(function(s,u,r,v,e,y,l,a,b){ a=u.createElement(r);s[e][r]=v; b=u.getElementsByTagName(r)[0];a.async=1;a.src=v;b.parentNode.insertBefore(a,b);}) (window,document,'script','https://cdn.surveylab.com/inc.js/min/widget.js','MSL');
</script>
Available parameters :
Parameter |
Description |
firstName |
Name |
lastName |
Surname |
email |
Email |
phone |
Phone |
language |
Language (ISO code e.g. EN, FR, PL) |
custom1 |
Custom 1 |
custom2 |
Custom 2 |
custom3 |
Custom 3 |
custom4 |
Custom 4 |
custom5 |
Custom 5 |
custom6 |
Custom 6 |
custom7 |
Custom 7 |
custom8 |
Custom 8 |
- Press + ADD TRIGGER button to define rules that will show or hide the widget.
Functionality is available in the Enterprise plan.