The CSAT Widget allows you to display the percentage score from any individual survey in your SimpleSat account.

Example:

Getting your widget code

Widget code is not yet accessible through the SimpleSat dashboard. You can grab your code by following the instructions below. 

Warning ❗If the following instructions nauseate you in any way, just shoot us a message and we'll send you what you need.

Copy the following code

<div class="csat-widget">
<div id="simplesat-csat-widget"></div>
<script>
  (function(document) {
    var addWidgetScriptTag = function() {
      var lastScript = Array.prototype.slice.call(document.getElementsByTagName('script')).slice(-1)[0]
      var script = document.createElement('script')
      script.src = 'https://s3-eu-west-1.amazonaws.com/simplesat-cdn/csat.js'
      lastScript.parentNode.insertBefore(script, lastScript.nextSibling)
      script.addEventListener('load', function() {
        Widget.config({
          showIcon: true,
          dateRange: 90,
          description: 'Live satisfaction score from the past 90 days',
          surveyKey: 'SURVEYKEY',
          companyKey: 'COMPANYKEY'
        })
        Widget.render()
      })
    }
    document.addEventListener('DOMContentLoaded', addWidgetScriptTag)
  })(document)
</script>
</div>

Add your survey key

Replace SURVEYKEY with with your survey's unique key. You can get this from your survey's embed code. It's the long string of characters after the /good/ value:

Add your company key

To find your company key, go to the Feedback Grid testimonial widget and copy the value from companyKey:

Here's the full list of options you can customize

  • dateRange - Choose between 30, 90, and 180 day ranges.
  • description - Change the default "Live satisfaction score from the past 90 days" text. Leave blank to show nothing.
  • surveyKey - The unique survey key to display satisfaction from. You can get it from the steps above.
  • companyKey - Your unique company key to display satisfaction from. You can get it from the steps above.

Embedding on your website

Copy the entire code and paste it where you'd like it to display on your website. The widget is responsive, which means it'll span the entire width of any container it's placed in.

Some content management systems might not allow you include JavaScript directly through the content editor window. To get around this, you can add the <script> portion of the code in the footer of your website. Then, add <div class="csat-widget">   to any page you'd like the widget to display.

We can help!

If editing your widget code's settings is too scary, we're happy to help. Just let us know what you need and we'll send you the updated code. 

Did this answer your question?