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:
- The startSurvey(<JAVASCRIPT_TRIGGER>) : So this method is used start survey using javascript trigger.
- The setUserInfo(<userData>): In this method the userdata parameter is passed as an object. This object will be like this:
- Here Keys name should be exactly the same as the contact property name on our portal. These are case sensitive.
- RemoveUserInfo(): If any userInfo is present, then it will be erased from the memory.
- The closeSurvey(): If any survey is currently running, then it will be closed.
const userData = {
Name: 'Bernard Donley',
Email: 'bernard@company.com'
};
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 integrate SurveySensum surveys in HubSpot Campaigns
This document will help you understand how to integrate SurveySensum with Hubspot’s marketing email campaigns. This integration will help you capture certain data from your hubspot campaigns such as name or email address of the respondent (and other ...
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 ...
Integration with Slack
Integrating SurveySensum with Slack - Getting Real-Time Slack Notifications SurveySensum’s integration with Slack is a great way for our customers to share customer reviews and specific survey responses with their teams in real-time. And without ...