web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

embed a survey so it shows on a web page

(0) ShareShare
ReportReport
Posted on by 202

My boss wants me to embed a survey on to a marketing page using Customer Voice Survey and I am not able to get the divider and code correctly formatted to make it work any help is greatly appreciated. 

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi.

    Did you get this to work? Try something like this:

    The embed code you get from customer voice:

    <script src="fefweafewacdnweu.azureedge.net/.../Embed.js" type="text/javascript"></script><link rel="stylesheet" type="text/css"href="fefweafewacdnweu.azureedge.net/.../Embed.css" /><script type = "text/javascript" >function renderSurvey(parentElementId,FirstName, LastName, locale){var se = new SurveyEmbed("iu1XS1e8Q0GCKbaMfefweafewacdnweuSF10DpJRUMzI3MzRKWDFRTEg5M1BGRUZMME9FNzc3NS4u","customervoice.microsoft.com/.../","true");var context = {"First Name": FirstName,"Last Name": LastName,"locale": locale,};se.renderInline(parentElementId, context);}</script>

    Add this on the page where you want to show the form:

    <div id="surveyDiv" style="height: 800px">

    <script>

    window.addEventListener('load', function () {

               renderSurvey("surveyDiv");

           }, false);

    </script>

    </div>

  • Lori J Profile Picture
    202 on at

    does the code from customer voice go before or after you display code?

  • Lori J Profile Picture
    202 on at

    Still not working thanks for you help.

  • Community Member Profile Picture
    on at

    Hi.

    Try do follow this, and see of you can fix it.

    Let me know.

    meganvwalker.com/.../

  • Suggested answer
    Arjun N Profile Picture
    on at

    Hi Lori,

    I am pasting a sample a sample HTML that you can model your embed code with the one you get from Customer Voice. The bolded sections below are the ones where you would need to revise. Change the script section with the one you got from Customer Voice for your survey. Similarly pass the parameters and set the height and width accordingly.  

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script src="">mfpembedcdnmsit.azureedge.net/.../Embed.js" type="text/javascript"></script><link rel="stylesheet" type="text/css" href="">mfpembedcdnmsit.azureedge.net/.../Embed.css" /><script type = "text/javascript" >function renderSurvey(FirstName, LastName, locale){var se = new SurveyEmbed("v4j5cvGGr0GRqy180BHbR1T-NOpw3HRGsN4w3pdDFMhUOUhGQTNMMzQ0NVFRNVlYSkU0QzZGQzlYQS4u",""https://mfpembedcdnmsit.azureedge.net/mfpembedcontmsit/","true");var">customervoice.microsoft.com/.../","true");var context = {"First Name": FirstName,"Last Name": LastName,"locale": locale,};se.renderButton( context);}</script>

    <script>
    window.addEventListener('load', function () {renderSurvey("MyFName", "MyLName", "En");}, false);
    </script>
    </head>


    <body>
    <div id="surveyDiv" style="width:500px;height:500px;">
    </div>

    </body>
    </html>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans