Embed

Have questions about how to embed your Zigpoll? Look no further.

At the core of any Zigpoll implementation is the embed code. Your embed code can be found at the bottom of your accounts page. If you copy and paste that code into the <head> tag of your website, you are all set.

The embed code looks something like this:

<script type='application/javascript'>
  ;(function () {
    window.Zigpoll = {
      accountId: YOUR_ACCOUNT_ID
    };

    var script = document.createElement("script");
    script.type = "text/javascript";
    script.charset = "utf-8";
    script.src = '${src}';

    document.head.appendChild(script);
  }());
</script>

YOUR_ACCOUNT_ID will be replaced the id for your particular account.

Contact us if you need help installing the embed code. For paid plans we offer end to end installation support.

Single Page Web Apps

If you have a single page webapp you can still use Zigpoll. All you need to do is run the following code immediately after you change a page within your app.

window.Zigpoll.refresh();

Load by Poll id

If you want to load a specific poll on a particular page, you can do so by adding a parameter called pollId to the Zigpoll object. For example:

<script type='application/javascript'>
  ;(function () {
    window.Zigpoll = {
      accountId: YOUR_ACCOUNT_ID,
      pollId: YOUR_POLL_ID
    };

    var script = document.createElement("script");
    script.type = "text/javascript";
    script.charset = "utf-8";
    script.src = '${src}';

    document.head.appendChild(script);
  }());
</script>

Will load the poll with id = YOUR_POLL_ID. This will override any display rules which are already set for the page.

Last updated