Embedding polls on your website with JavaScript

Posted by

Krista Stevens

Placing a poll on your site is a great way to connect with your audience. With a poll, you can ask for opinions on a subject that’s important to you and your readers. Today, we’re going to cover how to embed a poll into your site using our JavaScript embed code.

For WordPress.com site owners, we have a short code that you can copy and paste into a new post, or into the sidebar of your site, using a text widget. WordPress.org site owners can download the Polldaddy plugin and install it to use the WordPress short code. If you’re not on WordPress, you can use our JavaScript embed code to place a poll on your site.

First, you’ll want to create a poll.

Once you’ve got your poll set up, you’re ready to embed it into your website. To get the JavaScript embed code, hover over the title of your poll in your Polldaddy.com dashboard and click on Share:

On the Share popup, select JavaScript:

There are three JavaScript embed types: Inline, Results, and Slider Popup.

Embedding polls inline in your website

To embed a poll in the body of your webpage, select Inline. Copy the JavaScript we supply, and paste it into a new post or into the location on your website where you would like the poll to appear:

Here’s how your poll will look. (This poll is shown with basic styling.)

Embedding poll results only

You can choose to embed only your poll’s results into your website. To get the JavaScript code, hover over the title of your poll in your dashboard and click on Share. On the Share popup, select JavaScript. Then, on the right-hand side of the Share popup, select Results:

Copy the JavaScript code we supply, and then paste it into the location where you’d like to see you poll’s results on your website. Here’s a sample of what the poll’s results will look like:

Embedding the poll as a slider popup

You can choose to have your poll slide into view from the bottom, right-hand side of the screen. To get the JavaScript code, hover over the title of your poll in your dashboard and click on Share. On the Share popup, select JavaScript. Then, on the right-hand side of the Share popup, select Slider Popup:

Here’s a sample of what your poll will look like after it has slid into view:

If you’d like to get started creating polls for your site, you can sign up for a free account. Here’s a guide on how to create a poll using Polldaddy.com

This post is over a year old and the content may be outdated.
Please visit our support docs for the most up to the date information.
%d bloggers like this: