Embed
Have questions about how to embed your Zigpoll? Look no further.
At the core of any non-Shopify Zigpoll implementation is the embed code. Your embed code can be found in the "Installation" Tab.

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 = "//cdn.zigpoll.com/static/js/main.js";
script.async = true;
document.head.appendChild(script);
}());
</script>If you're one a site builder like Framer, Wix, or Webflow - see Integrations for more detailed instructions on implementing Zigpoll into your platform.
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

