ChurchKit Docs

Embeds

Install a ChurchKit embed, style it, and control where it can load.

A ChurchKit embed is a small script that renders live Planning Center content into a container on your page. Church staff create the embed in ChurchKit; you install the code they give you.

The embed code

Staff copy the embed code from the embed's Settings tab. It looks like this:

<div id="ck-embed-EMBED_ID"></div>
<script
  src="https://churchkit.io/embed.js"
  data-token="ACCESS_TOKEN"
  data-container="ck-embed-EMBED_ID"
  data-type="calendar"
></script>
AttributeRequiredDescription
data-tokenYesThe embed's access token.
data-containerYesThe id of the element to render into.
data-typeNoThe embed type, used as a hint while the embed loads.

Paste it where you want the content to appear. Keep the <div> before the <script>: the container must already be on the page when the script runs.

How it renders

  • The embed renders straight into your page, not in an iframe, so it fills the width of its container and grows to fit its content. Size it by sizing the container.
  • YouTube embeds include a YouTube player iframe.
  • The access token is visible in your page source. That's expected: it only allows what this embed does, such as reading the data it shows.
  • If staff click Regenerate Token, the old token stops working. Replace the code everywhere it's installed.

More than one embed on a page

The script reads the most recent <script data-token> tag on the page when it runs. Paste each embed's code as-is, as ordinary script tags (not async or defer), and each one renders into its own container.

Styling

Staff choose a style mode on the embed's Design → Style tab:

ModeWhat it does
Default (inherits page styles)ChurchKit's built-in layout, picking up your page's styles.
Custom Colors & FontsSet background, card background, text, secondary text, border, and accent colors, a font, and a border radius.
Unstyled (CSS class names)Minimal built-in styles. You style the embed with your own CSS.

With Custom Colors & Fonts, the font is applied by name only. Make sure your site loads that font.

CSS class names

In Unstyled mode, target the embed's ck-embed-* classes from your stylesheet. The full list, with a description of each class, is shown on the Style tab when Unstyled (CSS class names) is selected. Common ones:

ClassElement
ck-embedRoot container
ck-embed-toolbarRow holding the search bar and view switcher
ck-embed-search-inputSearch input
ck-embed-filtersVisitor filter controls
ck-embed-filter-selectA filter dropdown
ck-embed-gridCard grid layout
ck-embed-cardA single card
ck-embed-calendarCalendar month layout
ck-embed-listCalendar list layout
ck-embed-empty"No results" message
.ck-embed-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}

Which filters visitors can use is set per embed on the Design → Filters tab.

Allowed origins

By default, any website can load an embed. To limit it to your own sites, staff enter them in Allowed origins, in the Origin access card on the embed's Settings tab:

  • One origin per line, with the scheme and host only, like https://www.example.org. No paths and no wildcards. Up to 32 origins.
  • Origins must match exactly. If your site loads on both https://example.org and https://www.example.org, list both.
  • Once the list is saved, the Current policy shows Restricted and requests from any other site are refused.
  • Clearing the list and saving returns the embed to Any origin (legacy), so every website can load it again. To keep an embed restricted, leave at least one origin in the list.

Allowed origins also applies to the Data API.

Content Security Policy

If your site sends a Content Security Policy, it needs to allow ChurchKit. We recommend starting with:

  • script-src https://churchkit.io
  • connect-src https://churchkit.io
  • style-src 'unsafe-inline', because embeds style themselves with inline <style> blocks and style attributes, and the script doesn't support nonces. Without it, embeds render unstyled.
  • frame-src https://www.youtube.com for YouTube embeds

Images in embeds (such as group and event photos) load from Planning Center's image hosts, so your img-src needs to allow them. Check your browser console for blocked requests to find the exact hosts.

On this page