Pollz
A poll for any page, added with a single script tag. A question, a few options and live results: visitors sign in with a Commentz account, pick one (and can change their mind while it's open), and everyone watches the bars move.
What you get
Live results
Counts and percentages update as votes arrive, for every visitor, with no reload.
One vote each, changeable
One vote per account. People can switch their answer until you close the poll.
Private choices
Totals are public, but who voted for what is never shown to anyone else.
You decide when it ends
Close a poll by hand, or give it an end date and it closes itself. Reopen it, edit it, or delete it from the setup page.
Set it up
Most of the time goes on the one-off site proof; the poll itself takes a minute.
Register your site
A poll belongs to a site you have registered and proved. If you haven't yet, do that first: it covers every product. The guide explains it.
Write the question
On the Pollz setup page choose your client id, type the question and give it two to ten options. It's plain text, so there is nothing to format.
Copy the tag and paste it
The setup page shows the embed tag for this poll. Paste it where the poll should appear, on a page whose domain you registered.
Watch it fill up
Results update live for everyone looking. When you've heard enough, close the poll, or give it an end date and it closes itself. You can reopen it later, edit it or delete it.
The tag looks like this, with your own numbers filled in by the setup page:
<script src="https://www.commentz.co.uk/pollz.js"
data-client-id="your-client-id"
data-poll="1"
async></script>Make it match your site
Add your own CSS and the poll on every page of your site uses it.
- Sign in and open the setup page. Under Your CSS, choose your client id.
- Write only what you want to change. Your CSS is added after the built-in CSS below, inside the poll, so a rule of the same weight wins. You don't need to copy all of it.
- Save. It applies to the poll on every page of that client id the next time a page loads. Empty the box and save to go back to the built-in look.
For example, to change the colour of the buttons:
.pz-btn {
background: #7c3aed;
}
.pz-bar {
background: rgba(124, 58, 237, .2);
}What you can and can't do
- Your CSS reaches only the poll. It cannot change the rest of your page, and your page's own CSS cannot reach into the poll.
- Use the class names in the CSS below. They are the ones to rely on: we won't rename them casually, and anything not listed may change.
- Up to 20,000 characters. For safety it can't load other files or run code, so
url(...),@import,image-set(...), backslash escapes and<are refused, and the page says which one. Use colours, gradients, fonts already on the visitor's device, spacing and layout. - Anyone can read your CSS: it is delivered to every visitor's browser, like the rest of your page's styling.
The built-in CSS, as it stands
This is exactly what the poll ships with today, read from the live file. Copy a rule, change it, and paste it into the box.
.pz {
font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
color: #1a1a1a;
width: 100%;
padding: 1rem;
box-sizing: border-box;
}
.pz a {
color: #2563eb;
}
.pz h3 {
margin: 0 0 10px;
font-size: 1.1rem;
}
.pz-list {
margin: 0;
padding: 0;
list-style: none;
}
.pz-row {
position: relative;
margin: 0 0 8px;
border: 1px solid #ccc;
border-radius: 4px;
overflow: hidden;
background: #fff;
}
.pz-bar {
position: absolute;
top: 0;
left: 0;
bottom: 0;
background: rgba(37,99,235,.18);
}
.pz-row.pz-mine {
border-color: #2563eb;
}
.pz-row.pz-mine .pz-bar {
background: rgba(37,99,235,.32);
}
.pz-line {
position: relative;
display: flex;
justify-content: space-between;
gap: 12px;
width: 100%;
padding: 8px 10px;
box-sizing: border-box;
border: none;
background: none;
font: inherit;
color: inherit;
text-align: left;
}
button.pz-line {
cursor: pointer;
}
button.pz-line:disabled {
cursor: default;
}
.pz-label {
font-weight: 600;
word-wrap: break-word;
min-width: 0;
}
.pz-count {
white-space: nowrap;
color: #555;
font-size: 13px;
}
.pz-total {
color: #888;
font-size: 12px;
margin-top: 4px;
}
.pz-note,.pz-status {
color: #666;
padding: 6px 0;
}
.pz-msg {
margin-top: 6px;
font-size: 13px;
color: #c0392b;
}
.pz-btn {
margin-top: 8px;
padding: 6px 14px;
border: none;
border-radius: 4px;
background: #2563eb;
color: #fff;
font: inherit;
cursor: pointer;
}
.pz-btn:disabled {
opacity: .5;
cursor: default;
}
.pz-linkbtn {
border: none;
background: none;
padding: 0;
font: inherit;
color: #2563eb;
cursor: pointer;
text-decoration: underline;
}
.pz-row.pz-new {
animation: pz-flash 2s ease-out;
}
@keyframes pz-flash {
from {
background: rgba(37,99,235,.16);
}
to {
background: #fff;
}
}
@media (prefers-reduced-motion:reduce) {
.pz-row.pz-new {
animation: none;
}
}Common questions
Who can vote, and how many times?
Can people see who voted for what?
Can I see results before voting, or hide them?
Can I set an end date, or change a poll after I make it?
Can I pick more than one option, or ask several questions?
How many polls can I have?
Can a script stuff the ballot?
Want the full walk-through?
The getting-started guide covers the account, the site and its proof, with the exact text to copy.
Open the guide