logo

How to Install FastBots on a Website Built With Contentful (Headless CMS)

Follow these simple steps to install your chatbot on a site built with Contentful.

1

How to Get Your FastBots Chatbot Code

Before installing your chatbot on any platform, you’ll need your widget code.

Log in to FastBots.

Select the chatbot you want to install.

Click Deploy in the left-hand menu.

Scroll to Add to a Website.

Copy the script code using the copy icon.

You’ll paste this code into your website builder so the chatbot appears across all pages.

**How to Get Your FastBots Chatbot Code**

Before installing your chatbot on any platform, you’ll need your widget code.

Log in to FastBots.

Select the chatbot you want to install.

Click Deploy in the left-hand menu.

Scroll to Add to a Website.

Copy the script code using the copy icon.

You’ll paste this code into your website builder so the chatbot appears across all pages.
2

Step 1 — Add the script to your frontend project

Contentful is a headless CMS, so the chatbot code must be added to your frontend website, not inside the Contentful dashboard.

If you're using Next.js:

  1. Open app/layout.js or pages/_document.js (depending on your project).
  2. Paste your FastBots script code inside the <head> section:

    <script defer src="https://app.fastbots.ai/embed.js" data-bot-id="YOUR-BOT-ID"></script>

Save the file.

Deploy your updated site.

If you're using React, Vue, Nuxt, Gatsby, or another framework:

Locate your global layout or main template file (for example, Layout.jsx, default.vue, index.html, etc.).

Paste your FastBots script code just before the closing </head> tag.

Save and redeploy.

Step 2 — Confirm installation

Visit your live site and refresh — your FastBots chatbot should now appear across all pages.