Custom Code - Embedded Feedback - Guided Flow - Custom Code | XM Community
Skip to main content
Question

Custom Code - Embedded Feedback - Guided Flow - Custom Code


ZachShearer
Level 1 ●
Forum|alt.badge.img+2

I have an embedded creative, survey, and intercept that was created using the guided flow. Surveys created in this manner have some reduced functionality. For example, I can’t edit the survey questions to include custom JavaScript. 

The embedded feedback doesn’t render in an iframe, so I believe it’s possible that I could use the Qualtrics JavaScript API to interact with the intercept. 

Is there a method I can use to listen for a survey submission, retrieve the `responseId` and push that to the dataLayer? 

 

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: "QualtricsSurvey",
    surveyEvent: "Survey Submitted",
    responseId: "[[response id returned here"
  });
</script>

 

0 replies

Be the first to reply!

Leave a Reply