Communication between the embedded widget and your website

🚢 Shipped

We added JavaScript events that can communicate with your website where the survey widget is embedded. When a survey is completed, the iframe will trigger an event that communicates the completion to your website.

You can use it in code to capture survey completion and send data to third-party tools such as SalesPanel: 

    /* Add SalesPanel source code here */

  window.addEventListener('message', event => {
    try {
      const message =;
      if (message.type === 'ms-survey-completed') {
        const responses =;
        const res = responses.find((response) => response.question_id === "YOUR_QUESTION_ID");
        const customerEmail = res.value;
        $salespanel.push(["set", "identify:email", customerEmail, 'metasurvey']); // here we are sending the event data to SalesPanel
    } catch (error) {
      console.error('An error occurred in event ms-survey-completed:', error);

7 months ago

Kirill changed status to 🚢 Shipped

7 months ago

No votes yet