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

Announcements

No record found.

News and Announcements icon
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. 

  • 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
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 111 Super User 2026 Season 2

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 88

#3
ParthPatel249 Profile Picture

ParthPatel249 84

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans