Create an embed for a site

To display races on your web site, create an embed and copy its <script> code onto your site as raw HTML.

Create an embed

Embeds are created within elections to keep them organized, but they can use races from other elections (your organization’s or ones shared with you from other organizations).

Navigate to an election and click the “Embed” button near the upper right.

Click the “New embed” button in the upper right to create a new embed or click the name of an existing embed to edit it.

Embeds can be used on more than one page or site. Changes to an existing embed will be shown everywhere that embed is used. To make a variation on an embed while leaving existing ones unchanged, create a new embed.

Embed settings

In the settings section you can set an admin label, which will typically not be shown in the embed (but could be publicly accessible in some cases).

You can also enter content for the main embed screen. This is the content that will be initially shown to visitors on the default tab of the embed on your site.

To set which races will be shown in this embed, find the races you want in the “Available races” list and move them to the “Embedded races” list. You can use the “add to embed” and “remove from embed” buttons, or drag and drop between the lists.

To change the order the embedded races are shown in, use the up and down arrows in the left-hand gray bar or click and drag the gray bar to rearrange.

Get the embed code

The embed code is at the top of the embed screen for every saved embed (for new embeds, you must save before it shows up).

Copy that code into your web site as raw HTML or script (often a similar process to how you would embed something from social media or charting/visualization tools). The embed code does not change when you make changes to the embed code settings or races – once the embed is created, the code stays the same and changes are automatically reflected on your site.

Important: Remember, any races included in your embed must be published before they will appear on your site (by default races inherit their election’s status and are published when it is published, although they can override that setting to remain as a draft even when the election is published).

It can take up to five minutes for changes in ElectUp to be reflected in embeds on your site.