Search search
Help sections
FAQ

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.
widget

You can display widget at any moment e.g. after a certain amount of time or after certain actions performed by your website user.

Triggers :

  • After a certain amount of time.
  • After page scroll by a certain number of px.
  • In an attempt to leave a page.
  • If page URL contains certain keywords.

To create a web widget :

1. Select a survey for which you want to collect responses and press Collect responses button.
2. Press + ADD COLLECTOR button.

add collector

3. Select URL Link / Web widget distribution method.
4. Press Start collecting responses to activate collector.
5. Press Widget button, to copy the widget code and paste it in the BODY section of the website you want to display widget.

widget

6. 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
secondName Surname
email Email
phone Phone
custom1 Custom 1
custom2 Custom 2
... ...
custom8 Custom 8

7. Press + ADD RULE to define triggers and behaviour of your widget.
8. Copy and paste widget code in the BODY section of your web page, on which it will be displayed.

* Functionality is available for Advanced, Professional and Enterprise plan.