Easy2 minutes

Add the Sift widget to Ghost using HTML cards or Code Injection

Ghost is a clean, content-focused CMS, and Sift fits naturally into its workflow. Use the HTML card for one-off embeds on specific posts or pages, or Code Injection for site-wide installs.

Before you start: grab your Form ID and public API key from your dashboard. You will replace YOUR_FORM_ID and YOUR_PUBLIC_KEY in the snippets below.

Install Sift on Ghost

  1. 1

    Open the Ghost editor

    Log into Ghost Admin and open the post or page where you want the widget. Click into the editor.

  2. 2

    Add an HTML card

    Click the + button to add a new card and select HTML from the menu. The HTML card opens with an empty code field.

  3. 3

    Paste the Sift snippet and publish

    Paste the embed code, replace the placeholders with your dashboard values, click outside the card to confirm, and publish the post.

html
<script
  src="https://siftforms.com/widget/v1.js"
  data-schema-id="YOUR_FORM_ID"
  data-api-key="YOUR_PUBLIC_KEY"
  async
></script>

Alternative install methods

Site-wide via Code Injection

Go to Ghost Admin → Settings → Code Injection. Paste the snippet into the Site Footer field. The widget script loads on every page across the site.

Tips for the best results

  • The HTML card preserves your script as-is — no escaping required
  • Use the Sift webhook integration to send extracted data into Ghost Members or external CRMs
  • Code Injection is great for embedding the widget in members-only posts
  • Ghost themes vary — test the widget on your specific theme to verify spacing looks right

Troubleshooting

HTML card preview shows the code as text

The preview within the editor sometimes does not run scripts. Publish the post and view it on the live site to see the widget render.

Widget loads but cannot submit

Verify your form ID and public API key in the Sift dashboard. Also check that the form is set to Active.

Ready to embed Sift on Ghost?

Create your first form in your dashboard, then come back and paste the snippet above.