0

So there a few instructions on google searching how to embed Surveymonkey's survey over Wordpress.

  1. According to given instructions, what I need to do is just copy and paste of HTML code from Surveymonkey. But seems there are more things I need to do with or maybe I'm doing something wrong. Is there something I have to do? Or how I can see the survey in Wordpress? Thanks for your help.

  2. When it embeds in Wordpress, other mobile or tablet users wont' be able to see the survey over their mobile screens by the way? I read somewhere that the survey no longer available though.

    (function(t,e,s,n){var o,a,c;t.SMCX=t.SMCX||[],e.getElementById(n)||(o=e.getElementsByTagName(s),a=o[o.length-1],c=e.createElement(s),c.type="text/javascript",c.async=!0,c.id=n,c.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd_2FxosSgj773ROkNWSmWZyyP6Hb11hv4dFCD0s0WMi0bR.js"].join(""),a.parentNode.insertBefore(c,a))})(window,document,"script","smcx-sdk");https://www.surveymonkey.com> Create your own user feedback survey

DaeHan Ji
  • 11
  • 2

1 Answers1

0

To answer your first question, you can use the code below

HTML

<div id="smcx-sdk">
</div>

Javascript

<script>
(function (t, e, s, n) {
    var o,
    a,
    c;
    t.SMCX = t.SMCX || [], e.getElementById(n) 
    || (o = e.getElementsByTagName(s),
        a = o[o.length - 1], 
        c = e.createElement(s), 
        c.type = "text/javascript", 
        c.async = !0, c.id = n, 
        c.src = ["https:" === location.protocol ? "https://" : "http://", "widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd_2FxosSgj773ROkNWSmWZyyP6Hb11hv4dFCD0s0WMi0bR.js"].join(""),
        a.parentNode.insertBefore(c, a))
})(window, document, "script", "smcx-sdk");
</script>

Therefore, please make sure your Javascript is wrapped in a <script> tag as above and that you create an element (such as a div) with an id named smcx-sdk

To answer your second question, consider the following Stack Overflow answer: https://stackoverflow.com/a/34932110/4150884

Gregory Nikitas
  • 493
  • 2
  • 7