Create an embed for a site

Building an embed creates the interface your readers use to interact with a guide.

An election can have multiple embeds, and an embed can include races from other elections owned by your organization or shared with you by another organization.

You can use the same embed on more than one page or website. Changes to that embed will appear everywhere it is being used.

If you need a variation without changing an embed that is already in use, create a new embed.

Create an embed

Navigate to an election and click New under Embeds in the sidebar.

In the new embed window, select or deselect races from the current election. You can also add a race from another election.

Give the embed a name, then click the purple Create button. Its label shows the number of selected races. If you want an empty embed instead, choose Or, start from scratch.

New Embed window with races selected and Test Embed entered

Races

Races added to the embed appear in the Content tab. Click Add race to search for another race from the current election or another election you can access.

A race section includes a reader-facing section title, a URL path, and a race selector. Use the three-dot menu for additional move and remove options.

Race sections with titles, race selectors, group controls, and Add race

Section order

Rearrange race sections by dragging the dotted handle next to a section.

The three-dot menu can also move a block to the top, to the end, after another block, or into another section.

Filtering a race by group

To limit a race to specific groups, use + only include specific groups for that race. This is useful when only certain districts or other groups should appear in the embed.

Adding text blocks to race sections

A text block is formatted text that can be used to explain a guide or provide context for a race. Add text within the race section where you want it to appear.

To add content outside a race, click Add blank section at the bottom of the race list.

Layout

In the Content tab, the Layout area controls how visitors browse the embed.

Topic layout and candidate comparison controls

Topic layout

Choose how readers open topics and view candidate responses:

  • Accordion: Expand and collapse topics within the guide.
  • Tabs: Select a topic to show its responses in the same area.
  • Popup: Open a topic in a window over the guide.
Accordion topic Relevant experience expanded to show candidate responses
Accordion: open a topic to read responses; collapse it to shorten the page.
Tabs topic layout with Relevant experience selected
Tabs: choose a topic to display its responses in the same area.
Topic popup displaying candidate responses
Popup: open a topic in a window over the guide.

Select Collapse long responses by default to shorten the initial display of longer answers. Readers can open the full responses.

Candidate comparison

Choose what happens when a reader clicks Compare on a candidate’s response:

  • Link to topic in full race screen: Go to that topic in the race view to see the candidates’ responses.
  • Popup: Open the comparison over the current page.
Candidate comparison popup opened from a candidate page
The Popup comparison option shows other candidates’ responses without leaving the candidate page.

Voter location filtering

Turn on Enable voter location filtering to filter the guide by a visitor’s location. District maps are required; contact support if the editor says they need to be set up.

Choose Start with location filter to ask new visitors for their location first, with an option to skip. Choose Start with full embed to show the unfiltered guide first, with a prompt to filter by location.

Location filtering with Start with location filter and Start with full embed choices

Visitors can enter a home address, choose an area on the map, or browse without filtering. After selecting a location, they can change it or switch to the unfiltered view.

Map area, zoom, and shape

Drag the rectangle’s corners, edges, or body to set the embed’s initial map view. Panning or zooming the map only changes your view while editing; it does not save the initial view.

Map rectangle used to set the initial map view

Save and get the embed code

Click Save Embed to save your changes. There is one version of each embed: saving updates it everywhere it is used, including the live embed in the code modal.

Click Embed code in the upper-right of the editor. The modal contains the code, a Copy to clipboard button, and an area labeled Preview. That area displays the actual live embed, not a separate draft preview.

Embed code modal with Copy to clipboard and the live embed
The area labeled Preview displays the live embed. Select the image to enlarge it.

Click Copy to clipboard and paste the code into your website as raw HTML or script.

The embed code stays the same after the embed is created. You do not need to replace it when you change the embed’s settings, races, or content.

Important: A race must be published before it appears in the embed. Races normally inherit the election’s published or draft status, unless a race is set to remain a draft.

For less frequently used options, see UI labels and Embed settings.