How to integrate the embed code

How to integrate the embed code

Use the embedded survey in your web application
  • Now you have generated the code, you just need to paste the code anywhere between the <head></head> tag of your HTML code to install the SurveySensum widget.
  • After adding this code our SurveySensum widget is installed on your website/product and this exposes some methods.
  • These are:
  1. The startSurvey(<JAVASCRIPT_TRIGGER>) : So this method is used start survey using javascript trigger.
  2. The setUserInfo(<userData>): In this method the userdata parameter is passed as an object. This object will be like this:
  3. Here Keys name should be exactly the same as the contact property name on our portal. These are case sensitive.
  4. RemoveUserInfo(): If any userInfo is present, then it will be erased from the memory.
  5. The closeSurvey(): If any survey is currently running, then it will be closed.

const userData = {

Name: 'Bernard Donley',

Email: ''


How to use these methods:

For using these methods you can access the SurveySensum widget in a window object. Like this:

  • window.surveysensum.startSurvey(<JAVASCRIPT_TRIGGER>);
  • window.surveysensum.setUserInfo(userData);
    • Related Articles

    • How to activate and get the code snippet to embed the survey

      In this article you will get to know about activating the survey and generate the code-snippet for embedding in webpage Review and activate: Here you can check what the triggers are and also the appearance you have applied and activated in your ...
    • How to Embed your Survey on a Website

      Embed survey to your web application This article will help you in Embedding your Survey from SurveySensum on a Website. Embedding in a website is an essential sharing method for collecting user feedback for customer validation and customer-driven ...
    • Share Survey using a QR Code

      Download a QR Code and share your survey with your respondents. After creating your survey, your survey is ready to be shared! Let us see how we can share the survey by a scannable QR code. Click on QR Code and you will direct to the page where you ...
    • How to integrate with third-party applications using SurveySensum API's

      Use SurveySensum application for using open API's to integrate with third-party applications SurveySensum API helps you to integrate with your own application ecosystems such as CRM, HRM, and Helpdesk applications. It frees you from the ...
    • Integration with Intercom

      Integrate SurveySensum with Intercom Messenger SurveySensum’s integration with Intercom allows the users to collect information quickly and in a simplified way from a customer. This can be done by embedding a survey from SurveySensum in an Intercom ...