D. Widget Integration

Install Privas AI on Drupal

Embed the AI representative on a Drupal

By aninditoUpdated 4 Mar 2026

Drupal allows you to embed external scripts or components.

You can add the Privas AI representative by inserting the Privas embed script.

This guide explains how to install the Privas AI widget on a Drupal website.


Part 1 — Enable Block Content Module

Before adding the chatbot embed code, make sure the Block Content module is enabled.

Why this matters

Block Content allows you to create reusable content blocks.

This affects your content structure only.

It does not modify your theme, layout, or existing pages.


Step 1 — Enable Block Content

  1. Log in to your Drupal Admin Dashboard.
  2. In the left menu, click Extend.
  3. Under the List tab, search for Block Content.
  4. Check the box next to it.
  5. Click Install in the top-right corner.

drupal dashboard


Step 2 — Create a Block Type

  1. In the left menu, click Structure.
  2. Select Block Types.

drupal block

  1. Click Add Block Type in the top-right corner.

drupal add block

  1. Fill in:
    • Label — For example: “AI Assistant”
    • Description — Short explanation (e.g., “Privas AI Chatbot Block”)
    • Enable Create New Revision if you want version history
  2. Click Save.

drupal save block

Block Content is now ready.


Part 2 — Add the Privas AI Embed Code

Now we will create the block and paste the embed code.


Step 1 — Open Block Layout

  1. In the left menu, click Structure.
  2. Select Block Layout.

Drupal admin dashboard with Structure expanded in the left menu and Block layout selected


Step 2 — Choose Placement Area

  1. Scroll to the section where you want the assistant to appear
    (For example: Footer Bottom).
  2. Click Place Block.

Block Layout page scrolled to the Footer Bottom section with the Place block button highlighted


Step 3 — Create a Custom Block

  1. In the Place Block window, click Add Content Block.

“Place block” pop-up window showing the Add Content Block button highlighted

  1. Enter a short description for the block.

Drupal “Add Custom Block” screen with the block title field and body editor visible

Block creation form showing the Block description field filled in


Step 4 — Switch to HTML Mode

  1. In the Body editor, click the Three Dots icon.
  2. Select Source.

Body editor toolbar with the Source (HTML) option highlighted


Step 5 — Paste the Privas AI Embed Code

  1. Paste your Privas AI Embed Code into the Body field.
  2. Click Save and Configure.

Body field displaying the pasted Privas AI embed code and the Save button highlighted


Step 6 — Finalize Placement

  1. On the Configure Block page, review placement settings.
  2. Click Save Block.

“Configure block” page with placement settings and the Save block button highlighted


What This Installation Does — and Does Not Do

This installation:

✔ Displays your assistant in the selected region
✔ Loads automatically for visitors
✔ Works independently from Drupal modules

It does NOT:

✘ Modify your theme structure
✘ Change navigation menus
✘ Affect user roles or permissions
✘ Alter SEO settings

The widget simply connects your Drupal site to your configured Privas AI domain.


Optional — Install Site-Wide via Template (Advanced)

If you prefer to load the assistant globally:

  1. Go to Appearance → Theme Settings.
  2. Edit your active theme template.
  3. Paste the embed code before the closing </body> tag.
  4. Save changes.

This affects all pages.

It does not modify content.


If the Widget Does Not Appear

  • Clear site cache
  • Make sure the block is visible to all users
  • Confirm the embed code was pasted in Source mode
  • Verify JavaScript is not being filtered by text format settings

Next Step

Continue to Test the Representative.

Before sharing publicly, confirm that your assistant represents your business clearly and accurately.