Install the UserVoice Javascript SDK on your site

Our Javascript SDK gives your site access to UserVoice’s widgets, autoprompts, and user metrics system. This script, unique to your account, only needs be included once on a page.

The Javascript SDK looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
<script>
  // UserVoice JS SDK (only needed once on a page)
  (function(){
    var uv=document.createElement('script');
    uv.type='text/javascript';
    uv.async=true;
    uv.src='//widget.uservoice.com/[YOUR_API_KEY].js';
    var s=document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(uv,s)
  })();
  UserVoice = window.UserVoice || [];
</script>

Get your account’s unique embed code at https://app.uservoice.com/admin/settings/widgets/.

Once this is added, you’ll still need to add some Javascript if you want to show a widget on the page or identify your users…