# Embedding for Drupal

To add a chat widget to your Drupal website, you can do so by using the "Block" functionality provided by Drupal. Here's how.

***

## **Step 1: Log into your Drupal website**:

Login your website's admin panel by entering your credentials.

## **Step 2: Navigate to Structure**

Find and click on the **"Structure"** option in the main menu.

## **Step 3: Select Blocks**

In the Structure menu, you will find an option called **"Blocks"**. Click on this.

## **Step 4: Add a new block**

On the Blocks page, there should be a link or button to **"Add block"**. Click on this to create a new block.

## **Step 5: Enter your chat widget code**

In the block configuration, there will be a text box for block content. This is where you can add your chatbot widget code. Make sure to select the **"Full HTML"** or **"Raw HTML"** text format to ensure that your code is not modified or filtered by Drupal.

For a more detailed guide on [**how to retrieve your chatbot widget's code**](https://docs.wonderchat.io/setup-guides/adding-your-chatbot-to-your-website/how-to-embed-a-chat-widget), customize your chat widget or page, see the pages below:

[how-to-embed-a-chat-widget](https://docs.wonderchat.io/setup-guides/adding-your-chatbot-to-your-website/how-to-embed-a-chat-widget "mention")

[how-to-embed-a-chat-screen](https://docs.wonderchat.io/setup-guides/adding-your-chatbot-to-your-website/how-to-embed-a-chat-screen "mention")

## **Step 6: Configure the block visibility**

In the same block configuration, there will be settings for where and when this block should appear on your site. You can configure these settings to ensure the chat widget appears on all pages, only on certain pages, or only for certain users, etc.

## **Step 7: Save your block**

Once you've entered your code and configured the block settings, you can save your block. The chat widget should now appear on your website according to the visibility settings you configured.

***

If you have any more questions, feel free to reach out to us at <mark style="color:purple;">**<support@wonderchat.io>**</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wonderchat.io/setup-guides/adding-your-chatbot-to-your-website/embedding-for-drupal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
