Skip to main content
All articles
Product
4 min read

How to Embed a Secure Vote on Your Website in Under 5 Minutes

Add a fully functional, verified voting widget to any website with a single embed code. Works with WordPress, Squarespace, React, and plain HTML. Real-time results, full audit trail, zero backend required.

VD
vote.direct team
A laptop screen showing a website with an embedded voting widget displaying live poll results

Why Embed a Vote?

Not every vote needs its own landing page. Sometimes you want voting to happen where your audience already is:

  • HOA websites: Let homeowners vote directly from the community portal
  • Nonprofit sites: Board elections embedded in the member dashboard
  • Creator communities: Fan polls embedded in your content
  • Company intranets: Team decisions without switching apps
  • Event pages: Live audience polls during conferences

vote.direct embeds are fully functional voting interfaces, not simplified poll widgets. They support all verification levels(email, SMS, government ID), real - time results, weighted voting, and complete audit trails.

How It Works

Step 1: Create Your Vote

Go tovote.direct / create and set up your election the normal way. Choose your questions, verification level, schedule, and settings.

Step 2: Get the Embed Code

Once your vote is published, copy the embed URL from your dashboard. The format is:

```

https://vote.direct/embed/v/your-vote-slug

```

Step 3: Add to Your Site

HTML (any website):

```html

<iframe

src="https://vote.direct/embed/v/your-vote-slug"

width="100%"

height="600"

frameborder="0"

allow="clipboard-write"

style="border: none; border-radius: 8px;"

></iframe>

```

WordPress:

Use the Custom HTML block in Gutenberg and paste the iframe code above.

Squarespace:

Add a Code block and paste the iframe. Set to "Display Source" if HTML doesn't render.

React / Next.js:

```jsx

export function VoteEmbed({ slug }) {

return (

<iframe

src={`https://vote.direct/embed/v/${slug}`}

width="100%"

height="600"

style={{ border: 'none', borderRadius: '8px' }}

allow="clipboard-write"

/>

);

}

```

That's it. The embed handles everything: voter verification, ballot display, vote submission, and results.

Website with an embedded vote widget showing a live election with real-time result bars
Website with an embedded vote widget showing a live election with real-time result bars

What's Included in the Embed

FeatureSupported
All question types (single choice, multi-choice, yes/no, ranked)Yes
Email verificationYes
SMS verificationYes
Government ID verificationYes
Real-time resultsYes
Weighted votingYes
Quorum trackingYes
Anonymous voting modeYes
Mobile responsiveYes
Audit trailYes

The embed is a fully responsive web application, not a simplified widget. It adapts to the container width and works on all devices.

EmbedShare LinkAPI
Best forExisting websitesStandalone votesCustom apps
Setup time2 minutes30 secondsHours-days
CustomizationContainer stylingFull pageComplete control
VerificationAll levelsAll levelsAll levels
Results displayBuilt inBuilt inBuild your own
Requires backendNoNoYes

Real-World Examples

HOA Community Portal

A 500-unit community embeds their annual board election directly on their HOA website. Homeowners log into the community portal and vote without navigating to a separate site. Participation jumped from 35% to 62% in the first year: members were more likely to vote when it was one click away on a site they already visit.

Conference Live Polls

A tech conference embeds live audience polls on their event page. Speakers pose questions during talks, and attendees vote from their phones by visiting the event page. Results update in real time on the main screen.

Creator Community

A YouTube creator with 500K subscribers embeds fan polls on their website. "Which game should I play next?" gets 15,000 votes with email verification, real fans, not bots.

Security Considerations

Embeds use the same security infrastructure as standalone votes:

  • HTTPS only: Embeds are served over TLS 1.3
  • CORS headers: The embed communicates with vote.direct APIs using standard CORS
  • No cookie leakage: The iframe is sandboxed; your site cannot access voting session data
  • CSP compatible: Works with Content Security Policy headers (add `vote.direct` to your frame-src directive)

The voter's identity verification and vote submission happen entirely within the vote.direct iframe. Your website never handles or sees voter PII.

FAQ

Q: Does the embed work on mobile?

Yes. The embed is fully responsive and works on phones, tablets, and desktops. It adapts to the iframe container width automatically.

Q: Can I style the embed to match my site?

The embed uses vote.direct's design system, but it inherits your container's width and border radius. Custom theming (colors, fonts) is on our roadmap.

Q: What happens when the vote closes?

The embed automatically switches from the ballot view to the results view. No code changes needed.

Q: Do voters need a vote.direct account?

No. Voters verify their identity (email, SMS, or ID) directly in the embed. No account creation required.

This article is general information, not legal advice. We recommend you do your own research and confirm anything you plan to act on. Where this article states law, the section is cited so you can read the primary source yourself rather than take our word for it — that is what the citations are for. Election requirements also turn on your own governing documents, which we have not seen, and statutes are amended. For advice about your community, consult a qualified attorney licensed in your state.

We work hard to verify every citation against the primary source, but laws change and errors happen. If you spot an inaccuracy, email [email protected] and we will correct it. See our editorial standards for how these pages are researched and checked.

What feature matters most in an online voting platform?

Your vote shapes what we build next.

Identity verification (email, phone, or ID)30%
Real-time results and transparency25%
Embeddable widgets for existing websites18%
Mobile-friendly voting experience27%
206 verified voters have weighed in
Share this article

Free: Board Meeting Agenda Kit

5 professional agenda templates for annual meetings, special meetings, budget reviews, elections, and emergency sessions. Includes a Robert's Rules quick-reference card.

No spam. Unsubscribe anytime.

Run this vote online

Putting a decision to a vote?

Write your question and add your voters. Everyone gets a private ballot link, votes from any phone or computer, and the results are counted for you with a record of the outcome.

Elections start at $4.99 and cover up to 50 voters. Most cost $4.99 to $39.99. No subscription.

Questions? Call (512) 222-8191. A real person answers and can set your vote up with you.

Talk to a person

Have an election coming up?

Call or text us and a real person picks up. Tell us what you are voting on and we will explain the setup and exact published price, even if you are not ready yet. At 1,000 voters, our regular price is at least 95% below two-way First-Class postage alone.

Or leave us your contact

Leave an email and we will reach out. No account, no card, no obligation.